https://github.com/gabrielfalcao/chemist
Simple, flexible and testable active-record powered by SQLAlchemy - supports seamless encryption of fields through PyNaCL
https://github.com/gabrielfalcao/chemist
active-record flask functional-testing mysql mysql-orm postgresql psycopg2 python sql sqlalchemy unit-testing
Last synced: 4 months ago
JSON representation
Simple, flexible and testable active-record powered by SQLAlchemy - supports seamless encryption of fields through PyNaCL
- Host: GitHub
- URL: https://github.com/gabrielfalcao/chemist
- Owner: gabrielfalcao
- Created: 2017-11-20T03:10:50.000Z (over 7 years ago)
- Default Branch: chemist
- Last Pushed: 2024-07-27T02:46:10.000Z (10 months ago)
- Last Synced: 2025-01-17T03:51:14.038Z (4 months ago)
- Topics: active-record, flask, functional-testing, mysql, mysql-orm, postgresql, psycopg2, python, sql, sqlalchemy, unit-testing
- Language: Python
- Homepage: https://chemist.readthedocs.io
- Size: 210 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
.. Flask Chemist documentation master file, created by
sphinx-quickstart on Sun Nov 19 22:16:39 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.Chemist
=======A simple, flexible and testable active-record powered by SQLAlchemy.
.. image:: https://readthedocs.org/projects/chemist/badge/?version=latest
:target: http://chemist.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://travis-ci.org/gabrielfalcao/chemist.svg?branch=master
:target: https://travis-ci.org/gabrielfalcao/chemist
.. |PyPI python versions| image:: https://img.shields.io/pypi/pyversions/chemist.svg
:target: https://pypi.python.org/pypi/chemist
.. |Join the chat at https://gitter.im/gabrielfalcao/chemist| image:: https://badges.gitter.im/gabrielfalcao/chemist.svg
:target: https://gitter.im/gabrielfalcao/chemist?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badgeInstall
-------.. code:: bash
pip install chemist
Documentation
-------------`chemist.readthedocs.io `_
Basic Usage
-----------.. code:: python
from chemist import (
Model, db, DefaultTable
set_default_uri,
)engine = set_default_uri('sqlite:///example.db')
class BlogPost(Model):
table = DefaultTable('blog_post'
db.Column('id', db.Integer, primary_key=True),
db.Column('title', db.Unicode(200), nullable=False),
db.Column('content', db.UnicodeText, nullable=False),
)post1 = BlogPost.create(title='Hello World', content='\n'.join([
'Introduction...',
'Supporting Theory 1...',
'Supporting Theory 2...',
'Supporting Theory 3...',
'Conclusion',
]))for post in BlogPost.all():
print(post.title, post.id)Examples
--------1. `flask app `_