Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

paperlesspaper_client

Python client for the Paperlesspaper API


Table of Contents

  1. About
  2. Installation
    1. With pip (recommend)
    2. From source
  3. Usage
  4. Third party notices
  5. Development
    1. Setup environment
    2. Tests
    3. Documentation
  6. License

About

paperlesspaper_client is a python and cli client for the Paperlesspaper API. It supports the v1 of the API. You can find the official documentation of the Paperlesspaper API here.

Installation

With pip (recommend)

Use the following command to install paperlesspaper_client with pip:

pip3 install paperlesspaper_client

You can also very easily update to a newer version:

pip3 install paperlesspaper_client -U

From source

If you want to install the client from source, you can clone the repository and install it with pip:

git clone https://github.com/infinityofspace/paperlesspaper_client.git
cd paperlesspaper_client
pip3 install .

Usage

Set API token via environment variable:

export PAPERLESSPAPER_API_KEY="your-api-token"
paperlesspaper users delete <user-id>

Or pass the token as an option (takes priority over environment variables):

paperlesspaper --api-key "your-api-token" users delete <user-id>

Examples:

paperlesspaper users get <user-id>
paperlesspaper users list <organization-id>
paperlesspaper devices list
paperlesspaper papers create <organization-id> <device-id> <kind>

Optional method arguments are passed as flags. For methods that accept dynamic payload parameters, use --param key=value (repeatable).

Third party notices

All modules used by this project are listed below:

Name License
requests Apache 2.0
setuptools MIT
sphinx BSD 2 Clause
responses Apache 2.0
ruff MIT

This project is not associated with Paperlesspaper or The Wire UG.

Development

Setup environment

First get the source code:

git clone https://github.com/infinityofspace/paperlesspaper_client.git
cd paperlesspaper_client

Now create a virtual environment, activate it and install all dependencies with the following commands:

python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt

Now you can start developing.

Feel free to contribute to this project by creating a pull request. Before you create a pull request, make sure that you code meets the following requirements (you can use the specified commands to check/fulfill the requirements):

  • check unit tests: pytest
  • format the code: ruff format
  • check linting errors: ruff check

Tests

Run the tests with the following command:

pytest

Documentation

To build the documentation you can use the following commands:

sphinx-apidoc -f -o docs/source paperlesspaper_client
cd docs && make html

License

MIT - Copyright (c) Marvin Heptner

About

Python client for the Paperlesspaper API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages