Skip to main content

Privileges manipulation with SQLalchemy

Add grant/revoke privileges construct

Usage

Examples:

>>> from sqlalchemy import *
>>> from sqlalchemy_privileges import *

>>> str(GrantPrivileges('insert', Table('a', MetaData(schema='schema')), 'my.name'))
'GRANT INSERT ON schema.a TO "my.name"\n'

>>> str(RevokePrivileges(['insert', 'update'], table('a'), ['my.name', 'my.friend']))
'REVOKE INSERT, UPDATE ON a TO "my.name", "my.friend"\n'

>>> str(GrantPrivileges('all', table('a'), ['my.name', 'my.friend']))
'GRANT ALL ON a TO "my.name", "my.friend"\n'

Installation

sqlalchemy-privileges is available on PyPI and can be installed via pip

pip install sqlalchemy-privileges

Acknowledgements

Package inspired by sqlalchemy-views

And thank you to the various contributors!

Metadata

Release files for sqlalchemy-privileges 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlalchemy-privileges 0.2.0
File Size Uploaded
sqlalchemy_privileges-0.2.0.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlalchemy-privileges 0.2.0
File Interpreter ABI Platform
sqlalchemy_privileges-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 kB

Release files / sqlalchemy_privileges-0.2.0.tar.gz

Download URL sqlalchemy_privileges-0.2.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3154d0a85675002403fbe75aa360c96ddbd0f2ca5fc1eb37206d8f7cc0a93322
BLAKE2b-256 checksum
How to use checksums
95503f0542aeb630f056e86cc196b1ff4295f2b495527256ab2d66adcd02a97b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.10.6 Linux/5.15.0-1031-azure

Release files / sqlalchemy_privileges-0.2.0-py3-none-any.whl

Download URL sqlalchemy_privileges-0.2.0-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7074f816cefb70b71571b7cb4a6abe7f40b4ff63974f013e61b50fdb12842ee
BLAKE2b-256 checksum
How to use checksums
9321b8a43df678b53de20079e0149e1fb382e2d3896f76b6f0e50f89369c172f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.10.6 Linux/5.15.0-1031-azure

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page