module provide manipulation with privileges with sqlalchemy
Project description
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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sqlalchemy_privileges-0.2.0.tar.gz
.
File metadata
- Download URL: sqlalchemy_privileges-0.2.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.15.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3154d0a85675002403fbe75aa360c96ddbd0f2ca5fc1eb37206d8f7cc0a93322 |
|
MD5 | fb693e938f935e18194c966da4102d23 |
|
BLAKE2b-256 | 95503f0542aeb630f056e86cc196b1ff4295f2b495527256ab2d66adcd02a97b |
File details
Details for the file sqlalchemy_privileges-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: sqlalchemy_privileges-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.15.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7074f816cefb70b71571b7cb4a6abe7f40b4ff63974f013e61b50fdb12842ee |
|
MD5 | 9faee6088425e2486ad07a4f138d01b6 |
|
BLAKE2b-256 | 9321b8a43df678b53de20079e0149e1fb382e2d3896f76b6f0e50f89369c172f |