Skip to main content

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

Project description

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


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nibble-0.1.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

nibble-0.1.0-py2.py3-none-any.whl (18.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file nibble-0.1.0.tar.gz.

File metadata

  • Download URL: nibble-0.1.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nibble-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a890b31726722970c06abf2df19a860650d68815bbdedf4f76dab89971db342b
MD5 0ada20a12a58260155e9f6f4ca90f2ab
BLAKE2b-256 72a983d8c80e4cb412b43389b50335d4c4d637c3e27a8d5ea03e3c1953b4e7c8

See more details on using hashes here.

File details

Details for the file nibble-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for nibble-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 69dd31b079732aa13f7ae5eadb4813ed553255c0541302827def57732db12254
MD5 6c0866cb4832530343c0926d4489861e
BLAKE2b-256 2f73f7d63978ae1a10f555239ef139c51ad3b7108ffe354a4caf4843479dde32

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page