Skip to main content

jdict

Dictionary extended with convenience methods that depend heavily on dictionaries being ordered by insertion order.

Requirements

jdict requires Python 3.6+. It will raise an Exception if imported with a lower version.

jdict has no dependencies, except for the following methods which require pandas: series, datarow, and datacol.

Installation

For now you have to get the source and install with pip install -e .

Usage

>>> from jdict import jdict
>>> j = jdict(x=3, y=4, z=5)
>>> j.x
3
>>> j.first
('x', 3)
>>> j.first_key
'x'
>>> j.value_list
[3, 4, 5]
>>> j.list
[('x', 3), ('y', 4), ('z', 5)]
>>> j.last
('z', 5)
>>> j.pop_last()
('z', 5)
>>> j
{'x': 3, 'y': 4}

and so on. For more about the usage, see the tests.

Running tests

Run the following commands

  1. pip install pytest (if you don't have pytest)
  2. pip install pandas (if you don't have pandas)
  3. pip install -e . (if you haven't done so already)
  4. pytest

Metadata

Release files for jdict 1.0.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 jdict 1.0.0
File Size Uploaded
jdict-1.0.0.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jdict 1.0.0
File Interpreter ABI Platform
jdict-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / jdict-1.0.0.tar.gz

Download URL jdict-1.0.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
730c782d8009c7dbea026d96d9c8517329c047c8215d0982e0e2511e5843efe9
BLAKE2b-256 checksum
How to use checksums
01f065f3e3567fb6f4b4e8dfe7cc1133925f14a383c3a7059eb22b25e65a3313
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.4

Release files / jdict-1.0.0-py3-none-any.whl

Download URL jdict-1.0.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8951e6a3c49ffe23158974791061f1016b6d108d693fc96020669ab06c65c71
BLAKE2b-256 checksum
How to use checksums
d0f8bda21a2365ce2b2070bdee1eb8656271fde7facb26ecbe232d855fb20e5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.4

Release history Release notifications | RSS feed

This release

1.0.0 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