Python3 commons for the Drizm organization
Project description
Python Commons
This package includes shared code used by the Drizm organizations development team.
It is not intended for public usage but you may still download, redistribute or modify it to your liking.
Usage
Basic Install (utils only):
pip install drizm-commons
Full install (SQLAlchemy features available):
pip install drizm-commons[sqla]
Import like so:
import drizm_commons
Documentation
Introspection
from drizm_commons.inspect import SQLAIntrospector
table = SQLAIntrospector(my_table_instance)
""" Attributes """
table.tablename # get the name of the table
table.classname # get the classname of the declarative instance
table.columns # get all SQLA fields of the class
""" Methods """
table.primary_keys()
table.primary_keys(retrieve_constraint=True)
Changelog
0.1.1
- Added SQLAlchemy JSON Encoder
- Fixed bugs related to the Introspection API
- Added table registry
- Added additional utilities
0.1.2
- Added get_root_path and recursive delete Path utilities
- Fixed various bugs
0.2.0
- Added full test suite
- Added testing tools
- Revamped introspection API
- Provided additional overrides for the SQL connection adapter
0.2.1
- Added support for datetime JSON encoding
0.2.2
- Improved in-code documentation
- Integrated additional utils from drizm-django-commons
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
drizm-commons-0.3.0.tar.gz
(9.1 kB
view hashes)
Built Distribution
Close
Hashes for drizm_commons-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d623c86d86e3252bac5027f8c479d165d4c87489845e2fc7f9e52363c8d3f83 |
|
MD5 | 3567d4cc91bc560911692d9ec7d781ba |
|
BLAKE2b-256 | 1c6a0a79aaece9540842d10f73a1913390c1f2307fe0075628ce1f356cc06a53 |