Skip to main content

Little api client for paperless(-ngx).

Project description

pypaperless

GitHub Release Python Version GitHub License

Tests Codecov Linting Typing

pypaperless is a modern, fully async Python client library for the Paperless-ngx REST API.


Features

Feature Details
Fully async Built on asyncio + httpx.AsyncClient; drop-in for any async framework
Type-safe models All resources are validated Pydantic models
Complete resource coverage Documents, Correspondents, Tags, Document Types, Storage Paths, Custom Fields, Saved Views, Share Links, Workflows, Mail Accounts/Rules, Tasks, Trash, and more
CRUD + permissions Create, read, update, delete and manage object-level permissions per resource
Async iteration & paging Iterate over all items or page-by-page; server-side filtering via filter()
Document operations Upload, download, search (full-text & advanced), notes, suggestions, metadata
Custom field system Rich typed access to custom field values — read, write, remove with caching
Token generation generate_api_token() helper to exchange username + password for an API token
Custom HTTP client Bring your own httpx.AsyncClient for full control over timeouts, proxies, TLS, …

Quick example

import asyncio
from pypaperless import PaperlessClient


async def main():
    async with PaperlessClient("localhost:8000", "your-api-token") as paperless:
        # iterate all documents - pagination is handled automatically
        async for document in paperless.documents:
            print(document.id, document.title)

        # fetch a single item
        doc = await paperless.documents(42)

        # filter with server-side parameters
        async with paperless.tags.filter(name__icontains="invoice") as filtered:
            async for tag in filtered:
                print(tag.id, tag.name)


asyncio.run(main())

Installation

Requires Python 3.13+.

pip install pypaperless

Documentation

Full documentation is available here.

Compatibility matrix

pypaperless Paperless-ngx Python Notes
>= v6.0 >= 3.0 3.13 Current release
>= v5.2 >= 2.19 3.12
>= v5.0 >= 2.17 3.12
>= v4.x >= 2.15 3.12
< v4.0 < 2.15 3.11 Incompatible with Paperless-ngx >= 2.15

[!TIP] Keep both Paperless-ngx and pypaperless up to date to benefit from the latest API features and bug fixes.

Authors & contributors

pypaperless is written and maintained by: Tobias Schulz and Claude. Feedback and contributions are always welcome.

Check out all contributors.

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

pypaperless-6.0.0rc2.tar.gz (260.9 kB view details)

Uploaded Source

Built Distribution

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

pypaperless-6.0.0rc2-py3-none-any.whl (107.6 kB view details)

Uploaded Python 3

File details

Details for the file pypaperless-6.0.0rc2.tar.gz.

File metadata

  • Download URL: pypaperless-6.0.0rc2.tar.gz
  • Upload date:
  • Size: 260.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pypaperless-6.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 445fe6547e6b1cb7b8f5062b14b14f7220a1fb2d9f7015a220e3e54cf557713c
MD5 9ee91479d45e6bc052fdb37b953825dd
BLAKE2b-256 800e59b460f4ad6971fe7a9e0ed3b7e96e9e28e03837b4d32e43fc3add67ed57

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypaperless-6.0.0rc2.tar.gz:

Publisher: release.yml on tb1337/pypaperless

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pypaperless-6.0.0rc2-py3-none-any.whl.

File metadata

  • Download URL: pypaperless-6.0.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 107.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pypaperless-6.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 9aeeff45ba240505170a74a9dc41ee7ed290d5e4c7694cd66ae3d39811e1a055
MD5 ee0fd8deaaf52b427075fd352bc7fdad
BLAKE2b-256 6f39b4e07071389309cfa042308ecf2ef3cac8c2d0489ee992bde270b2066b4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pypaperless-6.0.0rc2-py3-none-any.whl:

Publisher: release.yml on tb1337/pypaperless

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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