Skip to main content

Implements an easy-to-use bridge to SQLAlchemy

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Example:

from solution import SQLALchemy

db = SQLALchemy('postgresql://scott:tiger@localhost:5432/mydatabase')

class ToDo(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    title = db.Column(db.String(60), nullable=False)
    done = db.Column(db.Boolean, nullable=False, default=False)
    pub_date = db.Column(db.DateTime, nullable=False,
        default=datetime.utcnow)

to_do = ToDo(title='Install Solution', done=True)
db.add(to_do)
db.commit()

completed = db.query(ToDo).filter(ToDo.done == True).all()

It does an automatic table naming (if no name is defined) and, to the base query class, adds the following methods:

  • first_or_notfound

  • get_or_notfound

  • to_json

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

Solution-1.6.2.tar.gz (148.7 kB view details)

Uploaded Source

File details

Details for the file Solution-1.6.2.tar.gz.

File metadata

  • Download URL: Solution-1.6.2.tar.gz
  • Upload date:
  • Size: 148.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Solution-1.6.2.tar.gz
Algorithm Hash digest
SHA256 173d3c360ff2980c707e66ef0a21cdac7646168fd45e1edb23a7e623773ec9e2
MD5 3e866cea2cd94737e766c7e000bde8fe
BLAKE2b-256 f0990527830864e3bf446ab906240d54060b2a593d9f2ee5efbedced8caca3af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page