Skip to main content

Nifty tools and containers

Project description

containers

Specialized containers as alternatives to Python’s built-in types and to those defined in the collections standard module.

  • defaultnamedtuple factory function for namedtuples with default arguments

  • forwardingdict defaultdict subclass that passes missing key to factory

functional

Higher order functions like those found in languages like Haskell.

  • compose compose a list of functions

  • flip create a function with reversed arguments of another function

  • foldl left-associative reduce

  • foldr right-associatve reduce

text

Utilities for manipulating text.

  • color add ansi colors and styles to strings

utils

Utility functions for manipulating containers. Thanks Jack Fischer, for the idea for rmap.

  • subdict extract a subset of a dictionary

  • match compare multiple objects based on a list of shared attributes

  • rmap recursively map a function onto items of nested containers

  • head get the first element of a sequence

  • tail get all but the first element of a sequence

  • last get the last element of a sequence

  • init get all but the last element of a sequence

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

skrt-1.3.2.1.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file skrt-1.3.2.1.tar.gz.

File metadata

  • Download URL: skrt-1.3.2.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for skrt-1.3.2.1.tar.gz
Algorithm Hash digest
SHA256 cbb7f5f2d3eb5315801443442a1ddc2eb5543f96b4ce7ce8c15e36b02a5d172a
MD5 3d70df720423b52f07fa0222a1044b5f
BLAKE2b-256 0fa9e8f6f36d2a9fc6a11e2a503376b5f6dba209f1c2e292057dd4645b57f746

See more details on using hashes here.

Supported by

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