Skip to main content

Chemist

A simple, flexible and testable active-record powered by SQLAlchemy.

Documentation Status https://travis-ci.org/gabrielfalcao/chemist.svg?branch=master

Install

pip install chemist

Documentation

chemist.readthedocs.io

Basic Usage

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

Metadata

Release files for chemist 1.7.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 chemist 1.7.0
File Size Uploaded Provenance Actions
chemist-1.7.0.tar.gz 12.5 kB Without provenance Details for chemist-1.7.0.tar.gz

Release files / chemist-1.7.0.tar.gz

Download URL chemist-1.7.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c997e06ef540804364ae9c05c3b4bccb3895076613b750882561ccead15c7cd6
BLAKE2b-256 checksum
How to use checksums
36e19f0a774ff73828064a66aadf5b1336d389dfdb1bea1609f79a613a731f5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.4

Security for chemist 1.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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