Skip to main content

Library for interacting with Clerk

Project description

CLERK

clerk-sdk is a Python library designed to simplify interactions with the Clerk API. It provides a robust and user-friendly interface for managing documents, handling API requests, and integrating structured data models into your workflows. With built-in support for Prefect task flows and retry mechanisms, clerk-sdk is ideal for developers looking to streamline their integration with Clerk.

Features

  • Document Management: Retrieve and manage documents and their associated files.
  • API Request Handling: Simplified GET and POST requests with automatic retries and error handling.
  • Data Models: Predefined Pydantic models for structured data validation and serialization.
  • Task Flow Integration: Prefect-based decorators for creating and managing task flows.
  • Extensibility: Easily extend and customize the library to fit your specific use case.

Installation

Install the library using pip:

pip install clerk-sdk

Usage

Initialize the Client

from clerk import Clerk

clerk_client = Clerk(api_key="your_api_key")

Retrieve a Document

document = clerk_client.get_document(document_id="12345")
print(document.title)

Retrieve Files Associated with a Document

files = clerk_client.get_files_document(document_id="12345")
for file in files:
    print(file.name)

Use the Prefect Task Decorator

from clerk.decorator import clerk_code

@clerk_code()
def process_document(payload):
    # Your processing logic here
    return {"status": "processed"}

Requirements

  • Python 3.10+
  • Dependencies listed in requirements.txt:
    • prefect>=3.4.1
    • pydantic>2.0.0
    • backoff>2.0.0

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clerk_sdk-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clerk_sdk-0.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file clerk_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: clerk_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for clerk_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ade858e54e148efc5ceaf2cbe347971d4c7b5159b3f507c18e4982935851fff4
MD5 77d3aaeac7fb16268b6a1ae6801255b9
BLAKE2b-256 2274ea9a1c4c859b893d874a9937bdd0206411eff363211bbf66dfa42f6666f2

See more details on using hashes here.

File details

Details for the file clerk_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: clerk_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for clerk_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6e663f9260a8282a033ff759a43c413d3d6f85b7ae6567b0b9f3937fb91904d
MD5 f95c1f1667db59792f4cbd0d4db87706
BLAKE2b-256 116fb7ad2e62b2b4cf8783292ef321193cccd7a685610ddcf9212bcb7c8d1a4b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page