PyRCS
An open-source tool for collecting railway codes used in different UK rail industry systems.
PyRCS is an open-source Python package that simplifies the collection and management of railway codes used across different systems in the UK rail industry. It provides a practical toolkit for researchers, practitioners and frequent users of the Railway Codes website who work extensively with railway codes in the UK. By leveraging Python's capabilities, PyRCS enables efficient access, retrieval and manipulation of railway code data, enhancing productivity and effectiveness in working with these codes.
During installation, PyRCS includes a set of pre-packaged data. When users request data from a specific category on the Railway Codes website, PyRCS loads the corresponding pre-packaged data for that category by default. Additionally, it provides functionality for direct access to the latest data from the source website, ensuring users stay up to date. Users can also update the pre-packaged data as needed, keeping their resources synchronised with the latest developments.
With PyRCS, users can leverage Python's power to streamline workflows and enhance productivity when working with railway codes in the UK rail industry.
Installation
PyRCS can be installed using uv (recommended for speed, reliability and modern dependency resolution), conda-forge (including pixi) or traditional pip.
Using uv (Recommended)
To add PyRCS to an existing project managed by uv:
uv add pyrcs
If you are working in an activated virtual environment:
uv pip install --upgrade pyrcs
Using pixi
To add PyRCS to a workspace using pixi:
pixi add pyrcs
Alternatively, to install PyRCS from PyPI inside a pixi project:
pixi add --pypi pyrcs
Using conda
To install PyRCS into an active environment using conda (or mamba):
conda install -c conda-forge pyrcs
For detailed options and development setup, see the full Installation Guide.
Quick start
For a concise guide on how to use PyRCS, check out the Quick Start tutorial, which includes illustrative examples for three frequently-used code categories in the UK railway system:
- Location identifiers (CRS, NLC, TIPLOC and STANOX codes)
- Engineer’s Line References (ELRs) and their associated mileage files
- Railway station data (mileages, operators and grid coordinates)
Documentation
The complete PyRCS Documentation is available in HTML and PDF formats.
It is hosted on Read the Docs, and the HTML version is also accessible via GitHub Pages. The documentation includes detailed examples, tutorials and comprehensive references to help users get the most out of PyRCS.
Cite as
Fu, Q. (2020). PyRCS: an open-source tool for collecting railway codes used in different UK rail industry systems. Zenodo. doi:10.5281/zenodo.4026744
@software{Fu_PyRCS_2020,
author = {Fu, Qian},
title = {{PyRCS: An open-source tool for collecting railway codes used in different UK rail industry systems}},
year = 2020,
publisher = {Zenodo},
doi = {10.5281/zenodo.4026744},
license = {MIT},
url = {https://github.com/mikeqfu/pyrcs}
}
For specific version references, please refer to Zenodo.
License
PyRCS is licensed under the MIT License.
Please note that this project was initially licensed under the GPLv3+ up to version 0.3.7. Starting with version 1.0.0, it has been re-licensed under the MIT License.
Acknowledgement
PyRCS uses data available from the Railway Codes website. The time and effort that the website's editor and all contributors put in making the site and data available are fully credited.
Metadata
Release files for pyrcs 1.3.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 | Provenance | Actions |
|---|---|---|---|---|
| pyrcs-1.3.0.tar.gz | 1.9 MB | Without provenance | Details for pyrcs-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyrcs-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for pyrcs-1.3.0-py3-none-any.whl |
Total release size: 4.0 MB
Release files / pyrcs-1.3.0.tar.gz
| Download URL | pyrcs-1.3.0.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e0034fcb124fc92fb356420be7e46eade3a6b89fb010d1e78aff799862aaec7
|
|
BLAKE2b-256 checksum How to use checksums |
35e7f6306b66a309d4daad62acd6c28a25c6f9539738d0819d38357540f7aeea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pyrcs-1.3.0-py3-none-any.whl
| Download URL | pyrcs-1.3.0-py3-none-any.whl |
|---|---|
| Size | 2.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
491431d136240b7d4511c35056ec2dd0b380e89b109c47cbed92d4e38f4da4c7
|
|
BLAKE2b-256 checksum How to use checksums |
d8c16b0582c8e2c55a19532baff6c093b0e1e3ff986b28624b06d059b2ada053
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pyrcs 1.3.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.