Inkit
This is an SDK to use with Inkit. Learn more at https://inkit.com or signup right away with https://app.inkit.com.
Installing:
pip install inkit
Usage Examples:
import inkit
from inkit.exceptions import InkitClientException, InkitResponseException
inkit.api_token = 'xxxxxtokenxxxxx'
# Get list of Folders
try:
resp = inkit.Folder.list(
sort='created_at',
data_description='My'
)
except InkitResponseException as e:
print(e)
print(e.response.data)
except InkitClientException as e:
print(e)
else:
print(resp.data.items)
# Create Template (HTML example with inkit_storage destination)
resp = inkit.Template.create(
name='My HTML template',
source='html',
file='<html>My awesome HTML</html>',
data={
'width': 6.5,
'height': 11.5,
'unit': 'in'
},
destinations=[{ # inkit_storage
'id': 'dest_12345',
'folder_id': 'fold_12345',
'expire_after_n_views': 2,
'required': True,
'retain_for': {
'hours': 1
}
}]
)
print(resp.data)
# Create Template (DOCX example with inkit_storage and salesforce destinations)
with open('path/to/your/file.docx', 'rb') as f:
docx = f.read()
resp = inkit.Template.create(
name='My DOCX template',
source='docx',
file=docx,
data={
'file_name': 'DOCX template'
},
destinations=[
{
'id': 'dest_12345',
'folder_id': 'fold_12345',
'expire_after_n_views': 2,
'required': True
},
{
'id': 'dest_123456',
'type': 'file'
}
]
)
print(resp.data)
# Get list of Templates
resp = inkit.Template.list(
search='My',
sort='created_at',
page=1,
source='docx'
)
print(resp.data.items)
# Get single Template
resp = inkit.Template.get('tmpl_12345')
print(resp.data)
# Create Render
resp = inkit.Render.create(
template_id='tmpl_12345',
merge_parameters={
'mp1': 'MP1',
'mp2': 'MP2'
},
destinations={
'inkit_storage': {
'name': 'My awesome render',
'description': 'My awesome render description'
},
'salesforce': {
'record_id': 'Your salesforce LinkedEntityId',
'file_name': 'My awesome PDF',
'description': 'Salesforce PDF description'
}
}
)
print(resp.data)
# Get single Render
resp = inkit.Render.get('rend_12345')
print(resp.data)
# Get list of Renders
resp = inkit.Render.list(
sort='-created_at',
page_size=2,
page=1,
destination_name='salesforce',
destination_status='completed'
)
print(resp.data.items)
# Get PDF document
resp = inkit.Render.get_pdf('rend_12345')
print(len(resp.content))
# Create renders Batch
resp = inkit.Batch.create(
template_id='tmpl_123456',
renders=[
{
'merge_parameters': {
'mp1': 'MP1',
'mp2': 'MP2'
},
'destinations': {
'inkit_storage': {
'name': 'My first batch render',
'description': 'My first batch render description'
},
'salesforce': {
'record_id': 'Your salesforce LinkedEntityId',
'file_name': 'My first awesome PDF',
'description': 'Salesforce first PDF description'
}
}
},
{
'merge_parameters': {
'mp1': 'MP11',
'mp2': 'MP22'
},
'destinations': {
'inkit_storage': {
'name': 'My second batch render'
},
'salesforce': {
'record_id': 'Your salesforce LinkedEntityId',
'file_name': 'My second awesome PDF',
'description': 'Salesforce second PDF description'
}
}
}
]
)
print(resp.data)
# Get list of renders Batches
resp = inkit.Batch.list(
destination_name='inkit_storage'
)
print(resp.data.items)
# Get single renders Batch
resp = inkit.Batch.get('rb_12345')
print(resp.data)
# Get list of Documents
resp = inkit.Document.list(
search='My'
)
print(resp.data.items)
# Get single Document
resp = inkit.Document.get('doc_12345')
print(resp.data)
# Delete Document
resp = inkit.Document.delete('doc_12345')
print(resp.status_code)
# Get PDF document
resp = inkit.Document.download('doc_12345')
print(len(resp.content))
Metadata
Release files for inkit 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| inkit-1.0.5.tar.gz | 7.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| inkit-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.2 kB
Release files / inkit-1.0.5.tar.gz
| Download URL | inkit-1.0.5.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38b994804da6f6aa29102c04e25b253729682b89a444c7b2995e047f4e2d5087
|
|
BLAKE2b-256 checksum How to use checksums |
0bc5b42f6559f66d7a7e3bc53c973cb45302776f021bfb4e70ec9a60abc6daa0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.10
|
Release files / inkit-1.0.5-py3-none-any.whl
| Download URL | inkit-1.0.5-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b5a7501f5aa23f3a7b1d3bbddff685171353e17d2b047aa788ae635304eeb94
|
|
BLAKE2b-256 checksum How to use checksums |
cfc01934d1cc8a5fb10cb186d65ddd5160e2270cd2df99ffd69bfad68d5294cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.10
|
Security for inkit 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.