Name | b26 JSON |
Version |
0.0.1
JSON |
| download |
home_page | |
Summary | Base 26 Encoder and Decoder |
upload_time | 2023-01-17 20:15:43 |
maintainer | |
docs_url | None |
author | phoenixR |
requires_python | >=3.7 |
license | MIT |
keywords |
alphabet
base 26
decoder
encoder
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
b26 - Base 26 Encoder and Decoder
=================================
A common example usage is alphabetical counting:
When 'Z' is reached, the next items will be 'AA',
'AB' and so on.
Installation
------------
```bash
pip install b26
```
Basic Usage
-----------
```python
import b26
for i, item in enumerate([
"Apples",
"Banana",
"Pineapple",
...,
]):
print(f"{b26.encode(i)}. {item}")
```
API
---
### `decode()`
```python
decode(string: str) -> int
```
_Converts an alphabetical string into an integer._
#### Parameters
__string__
_A string that only consists of ASCII letters to
convert into an integer._
### `encode()`
```python
encode(integer: int) -> str
```
_Convert an integer into an alphabetical string._
#### Parameters
__integer__
_A positive integer or 0 to convert into a
string._
#### Returns
_An uppercase alphabetical string._
Raw data
{
"_id": null,
"home_page": "",
"name": "b26",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "alphabet,base 26,decoder,encoder",
"author": "phoenixR",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/8c/a2/0e024cddea26f2b43eb078bc413b1b6b026dea14dd302a27901355a0f459/b26-0.0.1.tar.gz",
"platform": null,
"description": "b26 - Base 26 Encoder and Decoder\n=================================\n\nA common example usage is alphabetical counting:\nWhen 'Z' is reached, the next items will be 'AA',\n'AB' and so on.\n\n\nInstallation\n------------\n\n```bash\npip install b26\n```\n\n\nBasic Usage\n-----------\n\n```python\nimport b26\n\nfor i, item in enumerate([\n \"Apples\",\n \"Banana\",\n \"Pineapple\",\n ...,\n]):\n print(f\"{b26.encode(i)}. {item}\")\n```\n\nAPI\n---\n\n### `decode()`\n\n```python\ndecode(string: str) -> int\n```\n\n_Converts an alphabetical string into an integer._\n\n#### Parameters\n__string__\n_A string that only consists of ASCII letters to\nconvert into an integer._\n\n\n### `encode()`\n\n```python\nencode(integer: int) -> str\n```\n\n_Convert an integer into an alphabetical string._\n\n#### Parameters\n\n__integer__\n_A positive integer or 0 to convert into a\nstring._\n \n#### Returns\n\n_An uppercase alphabetical string._\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Base 26 Encoder and Decoder",
"version": "0.0.1",
"split_keywords": [
"alphabet",
"base 26",
"decoder",
"encoder"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e4902b4fdaf231c3db9d6fb45a6d7a2331d2fcf8c4860dc12edad530e1c4ab70",
"md5": "5df06c686845144315e225a5f5542100",
"sha256": "cee429584a05778836d15628c96254dfde39cf26833794ea9a88584d3e677319"
},
"downloads": -1,
"filename": "b26-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5df06c686845144315e225a5f5542100",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 2568,
"upload_time": "2023-01-17T20:15:41",
"upload_time_iso_8601": "2023-01-17T20:15:41.251646Z",
"url": "https://files.pythonhosted.org/packages/e4/90/2b4fdaf231c3db9d6fb45a6d7a2331d2fcf8c4860dc12edad530e1c4ab70/b26-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8ca20e024cddea26f2b43eb078bc413b1b6b026dea14dd302a27901355a0f459",
"md5": "a833657d2a4e1a7e7e550b1fa259acb4",
"sha256": "d36f110d67206c40f1aed9b3b783eaaa2ff3c404335fbf1ac555063439ea2bdb"
},
"downloads": -1,
"filename": "b26-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "a833657d2a4e1a7e7e550b1fa259acb4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 4349,
"upload_time": "2023-01-17T20:15:43",
"upload_time_iso_8601": "2023-01-17T20:15:43.299458Z",
"url": "https://files.pythonhosted.org/packages/8c/a2/0e024cddea26f2b43eb078bc413b1b6b026dea14dd302a27901355a0f459/b26-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-17 20:15:43",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "b26"
}