Skip to main content
nibble
======

.. image:: https://img.shields.io/pypi/status/nibble.svg
:target: https://pypi.python.org/pypi/nibble
.. image:: https://img.shields.io/pypi/v/nibble.svg
:target: https://pypi.python.org/pypi/nibble
.. image:: https://img.shields.io/pypi/pyversions/nibble.svg
:target: https://pypi.python.org/pypi/nibble
.. image:: https://travis-ci.org/gebn/nibble.svg?branch=master
:target: https://travis-ci.org/gebn/nibble
.. image:: https://coveralls.io/repos/github/gebn/nibble/badge.svg?branch=master
:target: https://coveralls.io/github/gebn/nibble?branch=master
.. image:: https://landscape.io/github/gebn/nibble/master/landscape.svg?style=flat
:target: https://landscape.io/github/gebn/nibble/master

Speed, distance and time calculations around quantities of digital information. Coming soon.

Installation
------------

::

$ pip install nibble

Demo
----

.. code-block:: python

from nibble.information import Information
from nibble.duration import Duration
from nibble.speed import Speed


information = Information(1, Information.GIBIBYTES)
print('{0}'.format(information)) # '1 GiB'
print('{0:GB}'.format(information)) # '1.07GB'
print('{0: GB}'.format(information)) # '1.07 GB'
print('{0:,.2f| Mb}'.format(information)) # '8,589.93 Mb'

speed = Speed(Information(20, Information.MEGABITS), Duration.SECOND)
print('{0}'.format(speed)) # '2.38 MiB/s'
print('{0:Mb}'.format(speed)) # '20Mb/s'
print('{0: Gb/w}'.format(speed)) # '12,096 Gb/w'
print(Speed.TEN_GIGABIT / 10
== Speed.HUNDRED_MEGABIT * 10
== Speed.GIGABIT) # True
print('{0: dB/y}'.format(Speed.TEN_GIGABIT)) # '39.42 PB/y'
print('{0:.2f| bB/mo}'.format(Speed.GIGABIT)) # 298.77 TiB/mo


Metadata

Release files for nibble 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nibble 0.1.0
File Size Uploaded
nibble-0.1.0.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nibble 0.1.0
File Interpreter ABI Platform
nibble-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 31.5 kB

Release files / nibble-0.1.0.tar.gz

Download URL nibble-0.1.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a890b31726722970c06abf2df19a860650d68815bbdedf4f76dab89971db342b
BLAKE2b-256 checksum
How to use checksums
72a983d8c80e4cb412b43389b50335d4c4d637c3e27a8d5ea03e3c1953b4e7c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / nibble-0.1.0-py2.py3-none-any.whl

Download URL nibble-0.1.0-py2.py3-none-any.whl
Size 18.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
69dd31b079732aa13f7ae5eadb4813ed553255c0541302827def57732db12254
BLAKE2b-256 checksum
How to use checksums
2f73f7d63978ae1a10f555239ef139c51ad3b7108ffe354a4caf4843479dde32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.0

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