Skip to main content

Count dictionary package in python.

Project description

count_dict

PyPI PyPI - Status GitHub Release Date Build Status Code Intelligence Status Language grade: Python Codacy Badge Scrutinizer Code Quality PyPI - Downloads PyPI - Python Version PyPI - License

This is a Python package for count dictionaries.

Installation

Installation can be done through pip. You must have python version >= 3.7

pip install count-dict

Usage

The statement to import the package:

from count_dict_package import count_dict

Example:

>>> accumulated = count_dict()
>>> accumulated['x'] += 9
>>> accumulated.items()
dict_items([('x', 9)])


>>> accumulated = count_dict(10)
>>> accumulated['x'] += 9
>>> accumulated.items()
dict_items([('x', 19)])


>>> accumulated = defaultdict(count_dict)
>>> accumulated['x']['y'] += 9
>>> {'x': dict(accumulated['x'])}
{'x': {'y': 9}}


>>> accumulated = defaultdict(count_dict(10))
>>> accumulated['x']['y'] += 9
>>> {'x': dict(accumulated['x'])}
{'x': {'y': 19}}

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

count_dict-1.1.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

count_dict-1.1.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file count_dict-1.1.1.tar.gz.

File metadata

  • Download URL: count_dict-1.1.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

File hashes

Hashes for count_dict-1.1.1.tar.gz
Algorithm Hash digest
SHA256 9571156e9700705da017244905db6d9a54f7fc55584e04c331d5d8621a67dd5a
MD5 c6e7067fe51ffdd0ed6e772392779ee4
BLAKE2b-256 e793cf3e16525e660f8b1e7473825933e8a3f2039e1b321d95e85cc89a689755

See more details on using hashes here.

File details

Details for the file count_dict-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: count_dict-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

File hashes

Hashes for count_dict-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ce3e141e2930d77a7f4040a4cee6d895fa4832fe6039fd630d71f66a043c257
MD5 e39f2017470e73b1c801f7165b02e348
BLAKE2b-256 b499e46091f8f5f09ec4346e9b59da4f31838345878b54da0c102ac0be9c6757

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