convbase
A command-line utility for converting integers between binary, octal, decimal, and hexadecimal bases.
Installation
pip install convbase
Or with uv:
uv tool install convbase
Commands
| Command | Output base |
|---|---|
bin |
Binary (0b) |
oct |
Octal (0o) |
dec |
Decimal |
hex |
Hexadecimal (0x) |
Input formats
All commands accept VALUE in any of the following formats:
| Format | Prefix | Example |
|---|---|---|
| Decimal | (none) | 10 |
| Binary | 0b |
0b1010 |
| Octal | 0o |
0o12 |
| Hexadecimal | 0x |
0xA |
Examples
$ bin 10
0b1010
$ bin 0xFF
0b11111111
$ oct 0b1010
0o12
$ oct 0xA
0o12
$ dec 0b1010
10
$ dec 0xFF
255
$ hex 10
0xa
$ hex 0b11111111
0xff
Error handling
Passing a value that cannot be parsed as an integer exits with a non-zero status and prints an error:
$ bin hello
Error: Invalid value for 'VALUE': invalid integer: 'hello'
Development
git clone https://github.com/jkomalley/convbase
cd convbase
just install
just check # format, lint, type-check, and test
License
MIT
Metadata
Release files for convbase 1.1.1
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 |
|---|---|---|---|---|
| convbase-1.1.1.tar.gz | 4.2 kB | With provenance | Details for convbase-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| convbase-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for convbase-1.1.1-py3-none-any.whl |
Total release size: 8.8 kB
Release files / convbase-1.1.1.tar.gz
| Download URL | convbase-1.1.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f643904519de0b80d21bde47d959c42a2680a754dfe77133df9d3d25419ea7d
|
|
BLAKE2b-256 checksum How to use checksums |
f8f94e06e0ec8f02f35fa50acb67baea901683e20c7d359474f5e4869b33ed3d
|
| 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 Sep 23, 2026.
Transparency logRelease files / convbase-1.1.1-py3-none-any.whl
| Download URL | convbase-1.1.1-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4adce246a240a8e1c60c6176546a10acbd94a37b45bf0f0ec0d3851fda4d723
|
|
BLAKE2b-256 checksum How to use checksums |
94fb9afa929264fbef2fb040a445ddea01233e0825716db53fa41240e9d4595b
|
| 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 Sep 23, 2026.
Transparency logSecurity for convbase 1.1.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for convbase-1.1.1.tar.gz
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 Sep 23, 2026.
Transparency logA 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.