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},
tracing={"enabled": True},
)
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.4.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.4.0.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| railway_sdk-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.6 kB
Release files / railway_sdk-0.4.0.tar.gz
| Download URL | railway_sdk-0.4.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4622f6caca7e2cdb2648dff6551489e267caff065286840c90d25f4ca204f40d
|
|
BLAKE2b-256 checksum How to use checksums |
7ed1b9db35b5450818ada1f420e7a6b09f58af4b19bf1956c77d47f48a32b6e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / railway_sdk-0.4.0-py3-none-any.whl
| Download URL | railway_sdk-0.4.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06be84b5eb3854ee15c6e1a604e814f8a9afd783fa4b31db78d637a4813e8502
|
|
BLAKE2b-256 checksum How to use checksums |
3f0b74a30c4f759daf4ec7fd5ff7a228159ef38184131d94d6dd2890883100b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency log