Skip to main content

A small API wrapper for the paperless-ngx dms.

Project description

Paperless API

Simple stupid Python wrapper for the paperless-ngx REST API endpoint. Find out more here: https://paperless-ngx.readthedocs.io/en/latest/api.html

Examples

Request a specific document and update it.

from pypaperless import *

# do not ever do that... but it would work
paperless = Paperless("http://paperless.url:8000", username="test", password="test")

# create a token via admin panel instead
paperless = Paperless("http://paperless.url:8000", "super_secret_api_token")

secret_document = paperless.get_document(1337)
secret_document.title = "TOP SECRET!"

paperless.save(secret_document)

Same is possible for every other entity provided by the API, excepting logs.

user = paperless.get_user(3)
correspondent = paperless.get_correspondent(1)
document_type = paperless.get_document_type(1)
tag = paperless.get_tag(1)
saved_view = paperless.get_saved_view(1)
storage_path = paperless.get_storage_path(1)
group = paperless.get_group(1)
mail_account = paperless.get_mail_account(1)
mail_rule = paperless.get_mail_rule(1)

Request all entitys from paperless.

users = paperless.get_users()
correspondents = paperless.get_correspondents()
document_types = paperless.get_document_types()
tags = paperless.get_tags()
saved_views = paperless.get_saved_views()
storage_paths = paperless.get_storage_paths()
groups = paperless.get_groups()
mail_accounts = paperless.get_mail_accounts()
mail_rules = paperless.get_mail_rules()

# could take some time
documents = paperless.get_documents()

Post a document to paperless.

# will return soon

Create a new correspondent:

new_correspondent = PaperlessCorrespondent(name="Salty Correspondent")

paperless.create(new_correspondent)

Search for a document and receive a list of results.

Search syntax is the same as in Paperless: https://docs.paperless-ngx.com/usage/#basic-usage_searching.

# will return soon

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-1.1.0.tar.gz (5.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-1.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file pypaperless-1.1.0.tar.gz.

File metadata

  • Download URL: pypaperless-1.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pypaperless-1.1.0.tar.gz
Algorithm Hash digest
SHA256 799899c97b47d9b785ea3d103ef17b29ee1a57499d86d1d9dc99d74983be62fe
MD5 cc5b3db30e60c7c0423f4090fb28d256
BLAKE2b-256 5f2fff66c9d87a9fa7b9b0de160c3d84df495347338686a96489142aac347fb9

See more details on using hashes here.

File details

Details for the file pypaperless-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pypaperless-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pypaperless-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9659e7c2d69306d099fca257b95e914f704d50cd3e28d9da72c015ea5b3ee210
MD5 6905773a472a068762988396b4c6049a
BLAKE2b-256 0526b714bbe09d9d7442578f6a13298dee0735001beffbb93ba9f0b5287174db

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