Skip to main content

Basic framework to handle authentication and authorization in any kind of Python application.

Project description

GuardPost

GuardPost provides a basic framework to handle authentication and authorization in any kind of Python application.

pip install guardpost

This library is freely inspired by authorization in ASP.NET Core; although its implementation is extremely different. Notable differences are:

  1. GuardPost is abstracted from the code that executes it, so it's not bound to the context of a web framework.
  2. GuardPost implements both classes for use with synchronous code (not necessarily I/O bound), and classes using async/await syntax (optimized for authentication and authorization rules that involve I/O bound operations such as web requests and communications with databases).
  3. GuardPost leverages Python function decorators for the authorization part, so that any function can be wrapped to be executed after handling authorization.
  4. The code API is simpler.

If you have doubts about authentication vs authorization...

Authentication answers the question: Who is the user who is executing the action?, or more in general: Who is the user, or what is the service, that is executing the action?.

Authorization answers the question: Is the user, or service, authorized to do something?.

Usually, to implement authorization, is necessary to have the context of the entity that is executing the action. Anyway, the two things are logically separated and GuardPost is designed to keep them separate.

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

guardpost-0.0.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

guardpost-0.0.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file guardpost-0.0.2.tar.gz.

File metadata

  • Download URL: guardpost-0.0.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

File hashes

Hashes for guardpost-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c49159771ae0fc9f763d74e24659b48b9226494571f95aacf563b1769c50004e
MD5 875bc8f744254f2e05cd4d874af7375a
BLAKE2b-256 3f132ea54c104b12a427c0ef5af61d741e573cd3e0f83aa11974cd854357ad17

See more details on using hashes here.

File details

Details for the file guardpost-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: guardpost-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

File hashes

Hashes for guardpost-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 067710cec0a0baaad084e2ae1bbc8c022033e6c0ecdbfe4438dd06d887276f6d
MD5 257a56b9098b31f6fbcf0745cb421dfd
BLAKE2b-256 4dd7394fb26e41b1db42887ff8210229ce97524298087e3f243913542b824368

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