Skip to content

Commit

Permalink
updated README and setup
Browse files Browse the repository at this point in the history
  • Loading branch information
grdn1337 committed Apr 5, 2022
1 parent 4673872 commit 66adb45
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# Paperless API

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

It is very simple and stupid. Maybe I will update it in the future to add some nice stuff.

## Examples

Request a list of correspondents and print them.

```python
import asyncio
import paperless
import pypaperless


async def main():
api = paperless.PaperlessAPI("http://127.0.0.1:9120", "SUPER_SECRET_API_TOKEN_HERE")
api = pypaperless.PaperlessAPI("http://127.0.0.1:9120", "SUPER_SECRET_API_TOKEN_HERE")

correspondents = await api.get_correspondents()

Expand All @@ -20,7 +23,9 @@ async def main():

asyncio.run(main())
```

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

```python
doctypes = await api.get_document_types()
tags = await api.get_tags()
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="pypaperless",
version="0.0.5",
version="0.0.6",
author="tbsch",
author_email="[email protected]",
description="A small API wrapper for paperless-ngx dms.",
Expand All @@ -20,7 +20,6 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
# package_dir={"": "pypaperless"},
packages=setuptools.find_packages(where="pypaperless"),
packages=["pypaperless"],
python_requires=">=3.6",
)

0 comments on commit 66adb45

Please sign in to comment.