Skip to main content

Miscellaneous utility scripts and Python objects for agile development.

Project description

snippyts

Miscellaneous utility scripts and Python objects for agile development.

  1. Table of ojects
  2. Instructions for running tests

Table of objects

No. Name Description Date added Date reviewed
1 snippyts.__init__.batched Partitions an input collection iterable into chunks of size batch_size. The number of chunks is unknown at the time of calling is determined by the length of iterable. September 22nd, 2024 September 22nd, 2024
2 snippyts.__init__.flatten Given a collection of lists, concatenates all elements into a single list. More formally, given a collection holding n iterables with m elements each, this function will return a single list holding all n * m elements. September 22nd, 2024 September 22nd, 2024
3 create_python_simple_package.sh BASH script to initialize a local Python package as a local git repository with a virtual environment, project files, and standard folder structure. It takes user input into account for parameterization from the command line. September 22nd, 2024 September 23rd, 2024
4 snippyts.__init__.to_txt Function that expects two string parameters as arguments and writes the first string as the content of a file at the location denoted by the second string (which is assumed to denote a POSIX path). September 23rd, 2024 September 23rd, 2024
5 snippyts.__init__.from_txt Function that can be directed to a local raw text file by its POSIX path and returns the content of that file as a string. September 23rd, 2024 September 23rd, 2024
6 snippyts.__init__.to_json Function that expects two parameters as arguments, a Python dictionary and a string, and writes the former as the content of a file at the location denoted by the latter (which is assumed to denote a POSIX path). September 24th, 2024 September 24th, 2024
7 snippyts.__init__.from_json Function that can be directed to a local JSON file by its POSIX path and returns the content of that file as a Python dictionary. September 24th, 2024 September 24th, 2024
8 snippyts.__init__.to_pickle Function that can be directed to a local raw text file by its POSIX path and returns the content of that file as a Python dictionary. October 3rd, 2024 October 3rd, 2024
9 snippyts.__init__.from_pickle Function that can be directed to a local Python-pickle file by its POSIX path and returns a copy of the artifact persisted in that file. October 3rd, 2024 October 3rd, 2024
10 snippyts.trie.Trie A class implementing a trie data structure. October 3rd, 2024 October 3rd, 2024
11 snippyts.vocabulary_tools.ExactStringMatcher A wrapper around flashtext2 providing a unified application interface shared with FuzzySet. October 12th, 2024 October 26th, 2024
12 snippyts.vocabulary_tools.FuzzyStringMatcher A wrapper around FuzzySet providing a unified application interface shared with flashtext2. October 13th, 2024 October 26th, 2024
13 snippyts.__init__.to_csv Function that expects two parameters as arguments, a list of lists (or, more geneally, an Iterable contaning other Iterables which is expected to represent a CSV-structured matrix) and a string, and writes the former as the content of a file at the location denoted by the latter (which is assumed to denote a POSIX path). October 26th, 2024 October 26th, 2024
14 snippyts.__init__.from_csv Function that can be directed to a local CSV file by its POSIX path and returns the content of that file as a list of lists (or, more geneally, an Iterable contaning other Iterables which is expected to represent a CSV-structured matrix). October 26th, 2024 October 26th, 2024

Running tests

Using pytest

Change into the project's home folder (first line below) and run pytest (second line). After moving into that directory, the working folder should contain two subfolders, src (in turn the parent of subfolder snippyts) and tests:

cd snippyts ;
pytest tests ;

Running the module as a package

cd snippyts ;
python -m src.snippyts.__init__

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

snippyts-0.2.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

snippyts-0.2.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file snippyts-0.2.0.tar.gz.

File metadata

  • Download URL: snippyts-0.2.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for snippyts-0.2.0.tar.gz
Algorithm Hash digest
SHA256 429fcc13ae95e1b3a2fc7006c41f97bb3b71450c20df456609d96729f11c35e4
MD5 370ed6daf049fde60a207c943beede5a
BLAKE2b-256 16ef685c1dcfccd3885526aaefaadf85832e6c5004c024d22bf8bd0be9ebf7c4

See more details on using hashes here.

File details

Details for the file snippyts-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: snippyts-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0

File hashes

Hashes for snippyts-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4043e6596bad4627f9e325d0ebe0f41263edd927e8fb6147892831be4ff278a9
MD5 e86110f9978ca5703153c75bfe0eb21c
BLAKE2b-256 f64ff43d800d77dba356c741b6d81b66047d730ef144509d55c6ff4a7cb089fb

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