Skip to main content

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.

See https://docs.railway.com/infrastructure-as-code

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)

Source distribution for railway-sdk 0.4.0
File Size Uploaded
railway_sdk-0.4.0.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for railway-sdk 0.4.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.2.0

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