# pdfless-api
Pdfless allows you to quickly and easily generate PDF documents using templates designed with HTML/CSS and conditional formatting.
- API version: v1
- Package version: 1.0.x
## Requirements.
Python 3.7+
## Installation & Usage
### pip install
If the python package is hosted on a repository, you can install directly using:
```sh
pip install pdfless-api
```
(you may need to run `pip` with root permission: `sudo pip install pdfless-api`)
Then import the package:
```python
import pdfless_api
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
import pdfless_api
from pdfless_api.rest import ApiException
from pprint import pprint
configuration = pdfless_api.Configuration(
host = "https://api.pdfless.com",
api_key= {'PdflessApiKey': 'ak_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx'}
)
# Enter a context with an instance of the API client
with pdfless_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pdfless_api.PDFsApi(api_client)
version = '1' # str |
try:
command = pdfless_api.GeneratePDFCommand(
template_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
payload= {
"string_variable": "value1",
"int_variable": 1,
"bool_variable": True,
"object": {
"child_variable": "child_value",
"string_list": [
"item1",
"item2",
"item3"
]
}
}
)
# Generate PDF
api_response = api_instance.generate(version, command)
print("The response of PDFsApi->generate:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling PDFsApi->generate: %s\n" % e)
```
## Documentation for API Endpoints
All URIs are relative to *https://api.pdfless.com*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DocumentTemplatesApi* | [**list_document_templates**](docs/DocumentTemplatesApi.md#list_document_templates) | **GET** /v{version}/document-templates | List document templates
*PDFsApi* | [**generate**](docs/PDFsApi.md#generate) | **POST** /v{version}/pdfs | Create PDF
*WorkspacesApi* | [**get_workspace**](docs/WorkspacesApi.md#get_workspace) | **GET** /v{version}/workspaces | Get workspace
## Documentation For Models
- [ApiExceptionDetailsResult](docs/ApiExceptionDetailsResult.md)
- [DocumentTemplateDto](docs/DocumentTemplateDto.md)
- [GeneratePDFCommand](docs/GeneratePDFCommand.md)
- [PDFDto](docs/PDFDto.md)
- [PDFDtoApiResult](docs/PDFDtoApiResult.md)
- [WorkspaceDto](docs/WorkspaceDto.md)
<a id="documentation-for-authorization"></a>
## Documentation For Authorization
Authentication schemes defined for the API:
<a id="PdflessAPIKeyAuth"></a>
### PdflessAPIKeyAuth
- **Type**: API key
- **API key parameter name**: apikey
- **Location**: HTTP header
## Author
contact@pdfless.com
Raw data
{
"_id": null,
"home_page": "https://github.com/Pdfless/pdfless-python",
"name": "pdfless-api",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "PDF Generator, Pdfless API, Pdfless",
"author": "Pdfless support team",
"author_email": "contact@pdfless.com",
"download_url": "https://files.pythonhosted.org/packages/02/2d/117f574de65e9412632592f34ac8ef50184a95ff30e3859577aa26c3fb7e/pdfless_api-1.1.1.tar.gz",
"platform": null,
"description": "# pdfless-api\nPdfless allows you to quickly and easily generate PDF documents using templates designed with HTML/CSS and conditional formatting.\n\n- API version: v1\n- Package version: 1.0.x\n\n## Requirements.\n\nPython 3.7+\n\n## Installation & Usage\n### pip install\n\nIf the python package is hosted on a repository, you can install directly using:\n\n```sh\npip install pdfless-api\n```\n(you may need to run `pip` with root permission: `sudo pip install pdfless-api`)\n\nThen import the package:\n```python\nimport pdfless_api\n```\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```python\n\nimport pdfless_api\nfrom pdfless_api.rest import ApiException\nfrom pprint import pprint\n\nconfiguration = pdfless_api.Configuration(\n host = \"https://api.pdfless.com\",\n api_key= {'PdflessApiKey': 'ak_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx'}\n)\n\n# Enter a context with an instance of the API client\nwith pdfless_api.ApiClient(configuration) as api_client:\n # Create an instance of the API class\n api_instance = pdfless_api.PDFsApi(api_client)\n version = '1' # str | \n\n try:\n\n command = pdfless_api.GeneratePDFCommand(\n template_id=\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx\",\n payload= {\n \"string_variable\": \"value1\", \n \"int_variable\": 1, \n \"bool_variable\": True, \n \"object\": {\n \"child_variable\": \"child_value\", \n \"string_list\": [\n \"item1\",\n \"item2\",\n \"item3\"\n ]\n }\n }\n )\n\n # Generate PDF\n api_response = api_instance.generate(version, command)\n print(\"The response of PDFsApi->generate:\\n\")\n pprint(api_response)\n except ApiException as e:\n print(\"Exception when calling PDFsApi->generate: %s\\n\" % e)\n```\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *https://api.pdfless.com*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*DocumentTemplatesApi* | [**list_document_templates**](docs/DocumentTemplatesApi.md#list_document_templates) | **GET** /v{version}/document-templates | List document templates\n*PDFsApi* | [**generate**](docs/PDFsApi.md#generate) | **POST** /v{version}/pdfs | Create PDF\n*WorkspacesApi* | [**get_workspace**](docs/WorkspacesApi.md#get_workspace) | **GET** /v{version}/workspaces | Get workspace\n\n\n## Documentation For Models\n\n - [ApiExceptionDetailsResult](docs/ApiExceptionDetailsResult.md)\n - [DocumentTemplateDto](docs/DocumentTemplateDto.md)\n - [GeneratePDFCommand](docs/GeneratePDFCommand.md)\n - [PDFDto](docs/PDFDto.md)\n - [PDFDtoApiResult](docs/PDFDtoApiResult.md)\n - [WorkspaceDto](docs/WorkspaceDto.md)\n\n\n<a id=\"documentation-for-authorization\"></a>\n## Documentation For Authorization\n\n\nAuthentication schemes defined for the API:\n<a id=\"PdflessAPIKeyAuth\"></a>\n### PdflessAPIKeyAuth\n\n- **Type**: API key\n- **API key parameter name**: apikey\n- **Location**: HTTP header\n\n\n## Author\n\ncontact@pdfless.com\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Pdfless API",
"version": "1.1.1",
"project_urls": {
"Homepage": "https://github.com/Pdfless/pdfless-python"
},
"split_keywords": [
"pdf generator",
" pdfless api",
" pdfless"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "022d117f574de65e9412632592f34ac8ef50184a95ff30e3859577aa26c3fb7e",
"md5": "e052c7fd55884f4185dbefcee75fdd9d",
"sha256": "bb4c720ea79e5f84b9efa3c5191ed416303f18fe45002cdb65eb95b27305d980"
},
"downloads": -1,
"filename": "pdfless_api-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "e052c7fd55884f4185dbefcee75fdd9d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 24757,
"upload_time": "2024-11-30T09:37:06",
"upload_time_iso_8601": "2024-11-30T09:37:06.978372Z",
"url": "https://files.pythonhosted.org/packages/02/2d/117f574de65e9412632592f34ac8ef50184a95ff30e3859577aa26c3fb7e/pdfless_api-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-30 09:37:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Pdfless",
"github_project": "pdfless-python",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "urllib3",
"specs": [
[
">=",
"1.25.3"
],
[
"<",
"3.0.0"
]
]
},
{
"name": "python_dateutil",
"specs": [
[
">=",
"2.8.2"
]
]
},
{
"name": "pydantic",
"specs": [
[
">=",
"2"
]
]
},
{
"name": "typing-extensions",
"specs": [
[
">=",
"4.7.1"
]
]
}
],
"tox": true,
"lcname": "pdfless-api"
}