Skip to main content

pyclo

Pyclo is a collection of functions for Python named after the Clojure standard library to perform the equivalent operation of the respective Clojure function.

Install with

pip install pyclo

Rationale

While immutability is neither idiomatic nor common in Python, it is still beneficial to implement the concept through engineering discipline. However, soon one will find oneself writing the same constructs over and over again, and even though these expressions are fairly succinct, it is much nicer to refer to them by name. The goal of this library is to provide a collection of functions that promote immutable manipulation of standard Python data structures as a concept without strictly enforcing it.

They say that there are only two hard problems in software engineering, one of them being naming. Clojure is chosen as a source of inspiration for these functions because the author of this library considers Clojure's naming the gold standard.

Reference

from pyclo import *
  • dissoc(dict, *keys) - return a copy of dict without specified keys.
  • select_keys(dict, *keys) - return a copy of dict only containing keys.
  • get_in(dict, keys, default=None) - look up a sequence of keys in a nested dict.

Development

make test
make lint
make upload  # upload to Pypi

Metadata

Release files for pyclo 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 pyclo 0.1.0
File Size Uploaded Provenance
pyclo-0.1.0.tar.gz 2.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 4.7 kB

Release files / pyclo-0.1.0.tar.gz

Download URL pyclo-0.1.0.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2dfd4887b108447d8b0b1abc7a3149671e311fc7d80723c33385bd21301b979e
BLAKE2b-256 checksum
How to use checksums
86fe8db2039da857baa517fbc27f4482eba459ab33a50d692a0e3a898c6cd42c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6

Release files / pyclo-0.1.0-py3-none-any.whl

Download URL pyclo-0.1.0-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
faf6511e713858939f5fd89808c23f6f5e69c805496f81d951039537c674f741
BLAKE2b-256 checksum
How to use checksums
bc6a6228e0a5e51af06a637262a01c5e5fd124dc75c36c4b0d2011edd1c27c03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6

Security for pyclo 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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