Skip to main content

Platform-Agnostic Security Tokens for Python

Project description

python-paseto

Platform-Agnostic Security Tokens for Python

Build Status ci-workflow Coverage Status Language grade: Python Code style: black

Installation

Clone the repository, in the future a pip install will be available.

poetry is used to manage project dependencies / build / test / publish.

Install dependencies with

poetry install

Run tests

pytest

To check code coverage run

coverage run -m pytest
coverage report

Low level API

Initial implementation of the V2 encrypt / decrypt functions. Alpha version. Low level API focuses on solid, high quality, production ready primitives as specified directly in the PASETO protocol.

from paseto.protocol.version2 import Version2

key = b"0" * 32
message = b"foo"
footer = b"sample_footer"

token = Version2.encrypt(message, key, footer)
plain_text = Version2.decrypt(token, key, footer)

assert plain_text == message

High level API

In the future a high level API will provide developer friendly access to low level API and support easy integration into other projects.

Code formatting is managed by black. To format run

black .

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

python-paseto-0.1.0a4.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

python_paseto-0.1.0a4-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file python-paseto-0.1.0a4.tar.gz.

File metadata

  • Download URL: python-paseto-0.1.0a4.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/5.8.0-45-generic

File hashes

Hashes for python-paseto-0.1.0a4.tar.gz
Algorithm Hash digest
SHA256 501428cc15faeda0413e7c5972b2aba35dfb80fa18b1fb725201f281952c5d66
MD5 f883e8d85524698ac7b8535d32c02967
BLAKE2b-256 748e51f1348270afe56f458bc3ffa9a82739eb1ffae6c4c93a399a97a911d495

See more details on using hashes here.

File details

Details for the file python_paseto-0.1.0a4-py3-none-any.whl.

File metadata

  • Download URL: python_paseto-0.1.0a4-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.2 Linux/5.8.0-45-generic

File hashes

Hashes for python_paseto-0.1.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 f421db836ef479e27a63b2d00b9b3c22f2d24aef8b8601576bed150f5ec5949e
MD5 aab45bfd225aa123db2315bdc83727c7
BLAKE2b-256 e1c1054cc9070175ecc1849316ab0d89d278e6e4680416dc5dcf64bed192d5cd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page