Railway Infrastructure as Code (IaC) authoring helpers for Python.
Install: pip install railway-sdk (or pip install -e . from this repo) then
author .railway/railway.py. Prefer one file per project that owns the
whole environment. Named partials are a last resort for split repos that cannot
share a file.
from railway_sdk import define_railway, github, postgres, project, service
@define_railway
def main(ctx=None):
db = postgres("db")
web = service(
"web",
source=github("org/app"),
start="gunicorn app:app",
env={"DATABASE_URL": db.env.DATABASE_URL},
)
return project("my-app", resources=[db, web])
The CLI evaluates this file and diffs against the linked environment.
Config as Code migration lives in the CLI (railway config migrate --lang py).
Last resort only: set module-level PARTIAL = "api" (same role as
export const partial in TypeScript). Do not rename a partial after apply.
Metadata
Release files for railway-sdk 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| railway_sdk-0.2.0.tar.gz | 7.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| railway_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.4 kB
Release files / railway_sdk-0.2.0.tar.gz
| Download URL | railway_sdk-0.2.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74348575a0a61425c35aa5757d069130e7c153a6e75fa642efdd44dcc843e473
|
|
BLAKE2b-256 checksum How to use checksums |
3d4d33c48920bbe606b6bb4b1d9f19940d87f15490f540fab5217aa9de8032b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / railway_sdk-0.2.0-py3-none-any.whl
| Download URL | railway_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0fc16a272ee9a34b54e5302f80db933020c524a210cb1e2b76534c68dd17f01
|
|
BLAKE2b-256 checksum How to use checksums |
552615f490cf61a4ca4d7e2e646a4f5fe4213058115f85294a85c1351e01c88f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|