https://github.com/cockroachdb/sqlalchemy-cockroachdb
SQLAlchemy adapter for CockroachDB
https://github.com/cockroachdb/sqlalchemy-cockroachdb
Last synced: 3 days ago
JSON representation
SQLAlchemy adapter for CockroachDB
- Host: GitHub
- URL: https://github.com/cockroachdb/sqlalchemy-cockroachdb
- Owner: cockroachdb
- License: apache-2.0
- Created: 2015-03-24T01:40:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-06-11T00:36:01.000Z (6 months ago)
- Last Synced: 2025-06-13T14:02:36.025Z (6 months ago)
- Language: Python
- Homepage:
- Size: 370 KB
- Stars: 150
- Watchers: 52
- Forks: 59
- Open Issues: 9
-
Metadata Files:
- Readme: README.asyncpg.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
## asyncpg support
The connection URL is of the form:
cockroachdb+asyncpg://root@localhost:26257/defaultdb
There is a customized version of the FastAPI SQL database tutorial for
`cockroachdb+asyncpg` available at
https://github.com/gordthompson/fastapi-tutorial-cockroachdb-async
### Testing
Assuming that you have an entry in test.cfg that looks something like
[db]
asyncpg=cockroachdb+asyncpg://root@localhost:26257/defaultdb
you can run the tests with asyncpg using a command like
pytest --db=asyncpg
If you want to run all the tests *except* the Alembic tests then invoke pytest
using a command like
pytest --db=asyncpg --ignore-glob='*test_suite_alembic.py'