level-zero
Convert building floor numbering to start from 0 — because arrays start at zero.
Supports US, UK, European, Japanese, Chinese, and Indian floor systems.
Installation
pip install level-zero
Usage
from level_zero import convert, FloorSystem, Building
# Quick conversions
convert("3", FloorSystem.US, FloorSystem.ZERO) # "2"
convert("G", FloorSystem.UK, FloorSystem.ZERO) # "0"
convert("5F", FloorSystem.JAPAN, FloorSystem.ZERO) # "4"
convert("2", FloorSystem.ZERO, FloorSystem.US) # "3"
# Shorthand helpers
from level_zero.converter import us_to_zero, zero_to_us
us_to_zero(3) # 2
zero_to_us(0) # 1
# Full building conversion table
b = Building(name="Empire State", system=FloorSystem.US, total_floors=102, basements=2)
print(b.mapping_table())
print(b.to_zero("13")) # handles skipped floors
print(b.from_zero("0")) # "1"
CLI
level-zero convert 3 --from us --to zero
level-zero convert G --from uk --to us
level-zero building --name "Tokyo Tower" --system japan --floors 20 --basements 3
level-zero systems
Why?
Because elevator[0] should be the ground floor.
License
MIT
Metadata
Release files for level-zero 0.1.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 |
|---|---|---|---|---|
| level_zero-0.1.0.tar.gz | 5.2 kB | Without provenance | Details for level_zero-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| level_zero-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for level_zero-0.1.0-py3-none-any.whl |
Total release size: 12.6 kB
Release files / level_zero-0.1.0.tar.gz
| Download URL | level_zero-0.1.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea9f155136fc129ee96bd62885a298bb915d40097a0144991602a36b85f33dab
|
|
BLAKE2b-256 checksum How to use checksums |
8dc96c64f6ca18336274be4dd186b590f77ec416be72aaffcccbe7522f6e855e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / level_zero-0.1.0-py3-none-any.whl
| Download URL | level_zero-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9901e01e347ca41ff3136064126b833460d2a702d4fd432b2bfc0114f41470e5
|
|
BLAKE2b-256 checksum How to use checksums |
d45c319192cbe49e87553ff55f79977b9ae8d2eb9dd856da935baa951cb16e2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for level-zero 0.1.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.