Add line number to file, create a numbered dictionary object of a list and import numbered dictionary from a file list.
Installation
The script is available on PyPI. To install with pip:
pip install numberify
Usage
To use the script in command line:
numberify <filename>
To use as a python package:
>> from numberify.numberify import Numberify
>> nfy = Numberify()
>> nfy.numberify_data(['foo', 'bar'])
{1: 'foo', 2: 'bar'}
>> nfy.numberify_data(['foo', 'bar'], start=55)
{55: 'foo', 56: 'bar'}
Let a file afile.txt contain:
milk
potatoes
biscuits
sugar
Import the file data numberifies as:
...
>> nfy.numberify_data('afile.txt')
{1: 'milk', 2: 'potatoes', 3: 'biscuits', 4: 'sugar'}
>> nfy.numberify_data('afile.txt', start=15)
{15: 'milk', 16: 'potatoes', 17: 'biscuits', 18: 'sugar'}
To numberify the whole file (apply changes to the file):
...
>> nfy.numberify_file('filename')
Tests
Run test:
python setup.py nosetests
Docs
For detailed docs of the package use python’s help utility.
License
This project is released under a GPL License.
Metadata
Release files for numberify 0.0.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 |
|---|---|---|---|---|
| numberify-0.0.1.tar.gz | 3.3 kB | Without provenance | Details for numberify-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| numberify-0.0.1-py2-none-any.whl | Python 2 | none | any | Details for numberify-0.0.1-py2-none-any.whl |
Total release size: 9.9 kB
Release files / numberify-0.0.1.tar.gz
| Download URL | numberify-0.0.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7fcf2f713b370186de632bae1f49415921128642f6f79766f7e6432b00cd180
|
|
BLAKE2b-256 checksum How to use checksums |
d6f6d46a939a302ffd114c02256097a4bfa9253d5166d6e0d1fc2a1b897b3586
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / numberify-0.0.1-py2-none-any.whl
| Download URL | numberify-0.0.1-py2-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
82ae550dc9d0baf4e8dba3217042b8541aa4b9b95a6bf798868c5d19431f99a9
|
|
BLAKE2b-256 checksum How to use checksums |
9d6548af4da8b685c31e3523ab17640c161270473e70bbd21f90b4b9605c5afb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for numberify 0.0.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.
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.