Database Abstraction Library
Project description
The Python SQL Toolkit and Object Relational Mapper
Introduction
SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL. SQLAlchemy provides a full suite of well known enterprise-level persistence patterns, designed for efficient and high-performing database access, adapted into a simple and Pythonic domain language.
Major SQLAlchemy features include:
An industrial strength ORM, built from the core on the identity map, unit of work, and data mapper patterns. These patterns allow transparent persistence of objects using a declarative configuration system. Domain models can be constructed and manipulated naturally, and changes are synchronized with the current transaction automatically.
A relationally-oriented query system, exposing the full range of SQL’s capabilities explicitly, including joins, subqueries, correlation, and most everything else, in terms of the object model. Writing queries with the ORM uses the same techniques of relational composition you use when writing SQL. While you can drop into literal SQL at any time, it’s virtually never needed.
A comprehensive and flexible system of eager loading for related collections and objects. Collections are cached within a session, and can be loaded on individual access, all at once using joins, or by query per collection across the full result set.
A Core SQL construction system and DBAPI interaction layer. The SQLAlchemy Core is separate from the ORM and is a full database abstraction layer in its own right, and includes an extensible Python-based SQL expression language, schema metadata, connection pooling, type coercion, and custom types.
All primary and foreign key constraints are assumed to be composite and natural. Surrogate integer primary keys are of course still the norm, but SQLAlchemy never assumes or hardcodes to this model.
Database introspection and generation. Database schemas can be “reflected” in one step into Python structures representing database metadata; those same structures can then generate CREATE statements right back out - all within the Core, independent of the ORM.
SQLAlchemy’s philosophy:
SQL databases behave less and less like object collections the more size and performance start to matter; object collections behave less and less like tables and rows the more abstraction starts to matter. SQLAlchemy aims to accommodate both of these principles.
An ORM doesn’t need to hide the “R”. A relational database provides rich, set-based functionality that should be fully exposed. SQLAlchemy’s ORM provides an open-ended set of patterns that allow a developer to construct a custom mediation layer between a domain model and a relational schema, turning the so-called “object relational impedance” issue into a distant memory.
The developer, in all cases, makes all decisions regarding the design, structure, and naming conventions of both the object model as well as the relational schema. SQLAlchemy only provides the means to automate the execution of these decisions.
With SQLAlchemy, there’s no such thing as “the ORM generated a bad query” - you retain full control over the structure of queries, including how joins are organized, how subqueries and correlation is used, what columns are requested. Everything SQLAlchemy does is ultimately the result of a developer- initiated decision.
Don’t use an ORM if the problem doesn’t need one. SQLAlchemy consists of a Core and separate ORM component. The Core offers a full SQL expression language that allows Pythonic construction of SQL constructs that render directly to SQL strings for a target database, returning result sets that are essentially enhanced DBAPI cursors.
Transactions should be the norm. With SQLAlchemy’s ORM, nothing goes to permanent storage until commit() is called. SQLAlchemy encourages applications to create a consistent means of delineating the start and end of a series of operations.
Never render a literal value in a SQL statement. Bound parameters are used to the greatest degree possible, allowing query optimizers to cache query plans effectively and making SQL injection attacks a non-issue.
Documentation
Latest documentation is at:
Installation / Requirements
Full documentation for installation is at Installation.
Getting Help / Development / Bug reporting
Please refer to the SQLAlchemy Community Guide.
Code of Conduct
Above all, SQLAlchemy places great emphasis on polite, thoughtful, and constructive communication between users and developers. Please see our current Code of Conduct at Code of Conduct.
License
SQLAlchemy is distributed under the MIT license.
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 Distributions
Hashes for SQLAlchemy-1.4.35-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48f0eb5bcc87a9b2a95b345ed18d6400daaa86ca414f6840961ed85c342af8f4 |
|
MD5 | ae2610c5fd12eb79526b7fd94d5afbcb |
|
BLAKE2b-256 | 639ad31aebbf8923772d4ff4b75b14ab0e1c69f2889c435a7b83205a4862583d |
Hashes for SQLAlchemy-1.4.35-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ff9f84b2098ef1b96255a80981ee10f4b5d49b6cfeeccf9632c2078cd86052e |
|
MD5 | 158a18de7bcd7c6ee1f38bf28edaca63 |
|
BLAKE2b-256 | 2659db37527ffa720386c0dc830a4f6b6b2bb2d50bbac3460d602a78cfb45093 |
Hashes for SQLAlchemy-1.4.35-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d17316100fcd0b6371ac9211351cb976fd0c2e12a859c1a57965e3ef7f3ed2bc |
|
MD5 | af339e8a2fa530778b5395c93f7d210b |
|
BLAKE2b-256 | b0cc453eae2ad2bce3ab679aaf2a57211cb824135dd667f17392a95014ed85de |
Hashes for SQLAlchemy-1.4.35-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4efb70a62cbbbc052c67dc66b5448b0053b509732184af3e7859d05fdf6223c |
|
MD5 | a1765eb1c3f990dffe89157fcacdbee3 |
|
BLAKE2b-256 | 0ae8f47d840ee2fdb3adeeececa72a041c16c9de3123227f1e5113fd1a5455a9 |
Hashes for SQLAlchemy-1.4.35-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9837133b89ad017e50a02a3b46419869cf4e9aa02743e911b2a9e25fa6b05403 |
|
MD5 | 5d6856a150d311a4d4eb5c45fdeafafe |
|
BLAKE2b-256 | f33162548eab55a3ed38b8d27f467c0345517eadd24528e214573615190f3988 |
Hashes for SQLAlchemy-1.4.35-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ba2c1f368bcf8551cdaa27eac525022471015633d5bdafbc4297e0511f62f51 |
|
MD5 | a07af591d3d847d218030a1a150c5c26 |
|
BLAKE2b-256 | c25ce8a525395a156996c1a8e9c60a9c4e8572e22fc1d509d4c9be8a3c5d8c39 |
Hashes for SQLAlchemy-1.4.35-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53c7469b86a60fe2babca4f70111357e6e3d5150373bc85eb3b914356983e89a |
|
MD5 | 409e0590f547537d3b34e42c3d336d2d |
|
BLAKE2b-256 | e22df90a358320e13741b7aeb7f971c18d9fc3e6c807dbffb2c6390416c2cb29 |
Hashes for SQLAlchemy-1.4.35-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecc81336b46e31ae9c9bdfa220082079914e31a476d088d3337ecf531d861228 |
|
MD5 | 7fdad679ab4597190a2e160fab4aa2d0 |
|
BLAKE2b-256 | 593bcce510f85f0a0c6ce0cf63a40e326a8cfc28e9190bc13fafd1c9b96da008 |
Hashes for SQLAlchemy-1.4.35-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d8edfb09ed2b865485530c13e269833dab62ab2d582fde21026c9039d4d0e62 |
|
MD5 | e8af3e0b3eec7b0d1ecf42e0bbed7aa8 |
|
BLAKE2b-256 | 707968f43182b036cccf1f51df1dc235e8fcf9dfa7ab0b4bbd9bd017fc2aa972 |
Hashes for SQLAlchemy-1.4.35-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28aa2ef06c904729620cc735262192e622db9136c26d8587f71f29ec7715628a |
|
MD5 | ab6c650941fa8ec7ae706f7592eea68c |
|
BLAKE2b-256 | 784612ba38378d28240e6a76ae7503c74bac9ab95e7963e3947f40971195d90f |
Hashes for SQLAlchemy-1.4.35-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6204d06bfa85f87625e1831ca663f9dba91ac8aec24b8c65d02fb25cbaf4b4d7 |
|
MD5 | 3b1acdcd8d3279b1a8bb6296fc7c79d9 |
|
BLAKE2b-256 | db9dc640e1749b97866778f117ad930e79a45a5152aa8db89fef77fc941d6c13 |
Hashes for SQLAlchemy-1.4.35-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b4eac3933c335d7f375639885765722534bb4e52e51cdc01a667eea822af9b6 |
|
MD5 | 4b54ba4523e23c822ea367c44986a1ff |
|
BLAKE2b-256 | d5d400d9e5e3c9ec9916dac5627945096a66aadc329191511cb16b5faaa3bd48 |
Hashes for SQLAlchemy-1.4.35-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e7094cf04e6042c4210a185fa7b9b8b3b789dd6d1de7b4f19452290838e48bd |
|
MD5 | f91d18e8f72009bc8b06270f32d7313f |
|
BLAKE2b-256 | 3db6b202236baf6cec75460fda2fbe30a36e50e608691dcda45abf22beb98d6b |
Hashes for SQLAlchemy-1.4.35-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28b17ebbaee6587013be2f78dc4f6e95115e1ec8dd7647c4e7be048da749e48b |
|
MD5 | 45e3965148b398cd3ee545381ff2cfa3 |
|
BLAKE2b-256 | fb6016495a9446ff530ec0a15ad7db34b611495b514e6d7dc34fae97b1623548 |
Hashes for SQLAlchemy-1.4.35-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e255a8dd5572b0c66d6ee53597d36157ad6cf3bc1114f61c54a65189f996ab03 |
|
MD5 | d3816b900b41b4b49e8c7c050438c7e4 |
|
BLAKE2b-256 | ecacba8a4283341f67ddd3f85f05359a44cdd581b0e0ce01207046c1088a3c18 |
Hashes for SQLAlchemy-1.4.35-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95411abc0e36d18f54fa5e24d42960ea3f144fb16caaa5a8c2e492b5424cc82c |
|
MD5 | 7fd15dc51229564cacc4def41d314f4c |
|
BLAKE2b-256 | 44e619f18fc78203be275dd03f99e513c180c5bdf79d523daa1c9b8ff718321e |
Hashes for SQLAlchemy-1.4.35-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bec63b1e20ef69484f530fb4b4837e050450637ff9acd6dccc7003c5013abf8 |
|
MD5 | 9d49742bf1a5bf9010b3ec9cde089a83 |
|
BLAKE2b-256 | 5324f7d9fe06a54078add2f3cc8e1ebbb619471291298df4efd097456b4b56af |
Hashes for SQLAlchemy-1.4.35-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e1a72197529ea00357640f21d92ffc7024e156ef9ac36edf271c8335facbc1a |
|
MD5 | 284f59dd518b0be786c2ffaa2aafaf7a |
|
BLAKE2b-256 | 04689057ce6f8c0426fb95f23f723d8e042476c0f7c633acb2836f88c8c3dd64 |
Hashes for SQLAlchemy-1.4.35-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | babd63fb7cb6b0440abb6d16aca2be63342a6eea3dc7b613bb7a9357dc36920f |
|
MD5 | 0980f8421f4e2033e1d2eb48b98d0a3f |
|
BLAKE2b-256 | a193f0938420e20ea6600edd7d4385aa1a7a5169d4dbb75b02df7ff6db48ef13 |
Hashes for SQLAlchemy-1.4.35-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 186cb3bd77abf2ddcf722f755659559bfb157647b3fd3f32ea1c70e8311e8f6b |
|
MD5 | 109bca6322d0c66e04d6576e0c016224 |
|
BLAKE2b-256 | c55abb14443fb6a2bf9591b65656a88170fe7a5e47adad57f04e850e33ffce6c |
Hashes for SQLAlchemy-1.4.35-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | effadcda9a129cc56408dd5b2ea20ee9edcea24bd58e6a1489fa27672d733182 |
|
MD5 | ab100d015bccce8a1dde5f062d063a21 |
|
BLAKE2b-256 | 872d171eb9c1b70242d87f2ff69d0bcdf5628b1ae5ee8af00782ba41197cd6ce |
Hashes for SQLAlchemy-1.4.35-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2489e70bfa2356f2d421106794507daccf6cc8711753c442fc97272437fc606 |
|
MD5 | 51c725df0c2ee1fa321903d6c026b8c5 |
|
BLAKE2b-256 | 125ff2c1f95b5bd8d4c3029569ef12036a972deacb984ada847be159c53015ef |
Hashes for SQLAlchemy-1.4.35-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c6c411d8c59afba95abccd2b418f30ade674186660a2d310d364843049fb2c1 |
|
MD5 | 481de66137845b9082b0171d86a894f1 |
|
BLAKE2b-256 | 0334ef992975fdd3dbb71683ed6e23548c6a703fe5c1ff650d78026ee1f8624f |
Hashes for SQLAlchemy-1.4.35-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63c82c9e8ccc2fb4bfd87c24ffbac320f70b7c93b78f206c1f9c441fa3013a5f |
|
MD5 | 28c68ac41065336e6ab9f0d9ac63eb83 |
|
BLAKE2b-256 | 378845b2ec44184d856ad3d75c1d626d9b4cd09dd65f65de3edabc35425fe9a4 |
Hashes for SQLAlchemy-1.4.35-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8b09e2d90267717d850f2e2323919ea32004f55c40e5d53b41267e382446044 |
|
MD5 | 80379c4a60d1f29ed8cfb0dd4bc3fe63 |
|
BLAKE2b-256 | 6bbfde22fb72153a303dd89dc8b2cae56bda6658ad04aeec1ebe215405b7fb9a |
Hashes for SQLAlchemy-1.4.35-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dac1924611698f8fe5b2e58601156c01da2b6c0758ba519003013a78280cf4d |
|
MD5 | 81f069f16641feec68e53491aed0e254 |
|
BLAKE2b-256 | 41a21810bc9c028ff0dd53e08ad464540bf472ad87b309edeafc7e6907946d52 |
Hashes for SQLAlchemy-1.4.35-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeea6ace30603ca9a8869853bb4a04c7446856d7789e36694cd887967b7621f6 |
|
MD5 | c37a44e691a377bce0e3a528166d8f61 |
|
BLAKE2b-256 | 945b94e9ec61c44d4299e03eba996f6b3526f133e370938c4f9dc5ec42020a9d |
Hashes for SQLAlchemy-1.4.35-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfd8e4c64c30a5219032e64404d468c425bdbc13b397da906fc9bee6591fc0dd |
|
MD5 | b94d418f819f6b1b26738a33a2ed96bf |
|
BLAKE2b-256 | 425779e2a9ceb2af64eece976c4a3fbe8e85ca9e46112a57a6b95e8cef6e6e4a |
Hashes for SQLAlchemy-1.4.35-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5dbdbb39c1b100df4d182c78949158073ca46ba2850c64fe02ffb1eb5b70903 |
|
MD5 | 0ffe4d85840800beebf3bbe13a3067f3 |
|
BLAKE2b-256 | 9754e4eb6c91d564bcec72f35b323684e3927d8f22c470e17e1f87bd86f873ed |
Hashes for SQLAlchemy-1.4.35-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da25e75ba9f3fabc271673b6b413ca234994e6d3453424bea36bb5549c5bbaec |
|
MD5 | b010f7a6e4d60e45ae93aa476ad2e233 |
|
BLAKE2b-256 | e302a97c89211993e6d1d20a5826fad49bcb7095c8078fbb4ff06cd91b9f09d0 |
Hashes for SQLAlchemy-1.4.35-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48036698f20080462e981b18d77d574631a3d1fc2c33b416c6df299ec1d10b99 |
|
MD5 | b1bcc3b62c2d8fe9830aad2d0f49bd2b |
|
BLAKE2b-256 | 1e8b6cc30a5c4eda835b62367e994c426c20742ed86ee7e4f275042024a7e225 |
Hashes for SQLAlchemy-1.4.35-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70e571ae9ee0ff36ed37e2b2765445d54981e4d600eccdf6fe3838bc2538d157 |
|
MD5 | 503d03e07c04728687a8c593cc395476 |
|
BLAKE2b-256 | a7425e788a248f55c3c6ee508ab8329d4ff6d147e0d064fd07dfb44141179f27 |
Hashes for SQLAlchemy-1.4.35-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d38a49aa75a5759d0d118e26701d70c70a37b896379115f8386e91b0444bfa70 |
|
MD5 | b13e98de0090a980e103c041feda5b43 |
|
BLAKE2b-256 | eda504c1a9dc293029c32ea9a0a05edcb06e6fbed6c72cca861de9653ac90923 |
Hashes for SQLAlchemy-1.4.35-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6fb6b9ed1d0be7fa2c90be8ad2442c14cbf84eb0709dd1afeeff1e511550041 |
|
MD5 | b85f0d0603742f4042226c905782c331 |
|
BLAKE2b-256 | 8a0ce6e46447da1d539a68a7290dde5037dd1d5f64f7c3c12e1b8e783510da36 |
Hashes for SQLAlchemy-1.4.35-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 093b3109c2747d5dc0fa4314b1caf4c7ca336d5c8c831e3cfbec06a7e861e1e6 |
|
MD5 | 75a61d8f0360df029fe2cc262ff70d2c |
|
BLAKE2b-256 | cff99daa71bf6c6664edc8b426e4df3a4c96bf01eb5b497a1b1ad0ab45a7b506 |