Skip to main content
https://badge.fury.io/py/numberify.png https://travis-ci.org/darkowlzz/numberify.svg?branch=master https://coveralls.io/repos/darkowlzz/numberify/badge.png

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)

Source distribution for numberify 0.0.1
File Size Uploaded
numberify-0.0.1.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for numberify 0.0.1
File Interpreter ABI Platform
numberify-0.0.1-py2-none-any.whl Python 2 none any Details

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

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page