Skip to main content

moonstream db

Setting up moonstreamdb

Copy sample.env to a new file and set the environment variables to appropriate values. This new file should be sourced every time you want to access the database with the moonstreamdb application or any dependents.

To be able to run migrations, copy alembic.sample.ini to a separate file (e.g. ./secrets/alembic.dev.ini) and modify the sqlalchemy.url setting in the new file to point at your database.

Make sure your database is at the latest alembic migration:

alembic -c ./secrets/alembic.dev.ini upgrade head

Adding a new table to database

Add SQLAlchemy model in moonstreamdb/models.py

Import new model and add tablename to whitelist in alembic/env.py

Create a migration:

alembic -c <alembic config file> revision -m "<revision message>" --autogenerate

Always check the autogenerated file to make sure that it isn't performing any actions that you don't want it to. A good policy is to delete any operations that don't touch the tables that you created.

Then run the migration:

alembic -c <alembic config file> upgrade head

Metadata

Release files for moonstreamdb 0.4.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moonstreamdb 0.4.6
File Size Uploaded
moonstreamdb-0.4.6.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for moonstreamdb 0.4.6
File Interpreter ABI Platform
moonstreamdb-0.4.6-py3-none-any.whl Python 3 none any Details

Total release size: 25.2 kB

Release files / moonstreamdb-0.4.6.tar.gz

Download URL moonstreamdb-0.4.6.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6f4b09926206ca59a5b4edd2a5dcb058014d505dfba4fbaa0606fb45c582639c
BLAKE2b-256 checksum
How to use checksums
718ad267348cdd75fbd43f0f6023a5186db92fab608aa44c2c8b53bcefb14c0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.8.18

Release files / moonstreamdb-0.4.6-py3-none-any.whl

Download URL moonstreamdb-0.4.6-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c23824ff7553a99200fa0dc4eae41103fbf8b8e84bcb67d1de21d3e628f146d
BLAKE2b-256 checksum
How to use checksums
6d0f9d8dd2ec8ca9e2a9759313a572fa8cd41bba872568e840f28fb47ab79b5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.8.18

Release history Release notifications | RSS feed

This release

0.4.6 This release

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.3.12

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

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