Skip to main content

dokuments

PyPI version PyPI pyversions Maintainer

The python client for dokuments, the Arkitekt document service: files uploaded to the deployment's S3 datalayer, and documents made of pages, each page an image with its OCR result (text lines and page rotation).

Installation

pip install dokuments

Usage

Every dokuments operation is a method of the Dokuments client, in a blocking and an a-prefixed async flavour: from_file_like (upload a file), get_file, search_files, watch_files, create_document, create_page, request_file_access, ….

In an arkitekt app

The client is injected by annotation. Add the service to your app and ask for dokuments: Dokuments:

from arkitekt import App, run
from dokuments import Dokuments, dokuments_service
from dokuments.api.schema import File

app = App("scanner", "0.1.0", services=[dokuments_service])


@app.action
def upload_scan(path: str, dokuments: Dokuments) -> File:
    """Upload Scan"""
    return dokuments.from_file_like(file=path)


if __name__ == "__main__":
    run(app)

Files travel between actions by id (@dokuments/file), so an action can take and return them directly.

From a script

from arkitekt import easy
from dokuments import dokuments_service

with easy("my-script", dokuments_service) as dokuments:
    file = dokuments.from_file_like(file="scan.pdf")  # a path, a Path or a binary file object
    document = dokuments.create_document(title="My scan", file=file.id)
    print(document.id, file.store.download())  # the bytes, through a scoped read grant

Uploads go straight to the datalayer: the client asks the server for upload credentials and writes the file to S3 before the mutation is sent.

Development

The generated API (dokuments/api/schema.py) comes from the checked-in schema.graphql and the documents in graphql/; see graphql.config.yaml.

Metadata

Release files for dokuments 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dokuments 3.1.0
File Size Uploaded Provenance Actions
dokuments-3.1.0.tar.gz 17.8 kB Without provenance Details for dokuments-3.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dokuments 3.1.0
File Interpreter ABI Platform Actions
dokuments-3.1.0-py3-none-any.whl Python 3 none any Details for dokuments-3.1.0-py3-none-any.whl

Total release size: 38.1 kB

Release files / dokuments-3.1.0.tar.gz

Download URL dokuments-3.1.0.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4325ca615ef5f8c09213d56e3e1e90d3781b15b4564e74f49a59a98570ba171c
BLAKE2b-256 checksum
How to use checksums
aa0e9255703007381a2a215a772b096b2ef32fc1993d4f6676365741f6ea999c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dokuments-3.1.0-py3-none-any.whl

Download URL dokuments-3.1.0-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6eff4a207f6531db51e301f0c3aa7611022e944406f25aecc9e103a194297220
BLAKE2b-256 checksum
How to use checksums
5efbad8b55f92ea0a22bd4b7f71c5e5b7580eb2b30b92b6795ac1f5470dfa842
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for dokuments 3.1.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page