Skip to main content

bpyth

Some boring Python Tools, see jupyter directory.

Try out

The directory jupyter contains many notebooks with examples. They are very easy to try out interactively online, with Google Colab. Just click the link at the top of the page and then select Runtime/Run all from the menu in Colab.

Install

pip install bpyth

Files Tools

  • dump_pickle: open, dump, close
  • load_pickle: open, load, close
  • StreamFiles: Iterable, returns all filenames of a parent directory
  • StreamLines: Iterable, returns all lines of a text file

Human Tools

  • human_readable_number: Rounds a number to a fixed number of significant digits.
  • human_readable_seconds: Converts seconds to human readable time
  • human_readable_bytes: Converts Bytes to human readable size

Iterable Tools

  • minivenn: Compare two sets
  • flatten: Yield all items from any nested iterable
  • remove_dups: Remove dups from a list whilst-preserving-order
  • sort_by_priority_list: Sort a list by a list or tuple of prioritized objects
  • cut_counter: Truncates rare values of a counter
  • ranking_from_counter: Converts a counter into a ranking

Object Analysis Tools

  • rtype: Recursive type. Parses an n-dimensional object and returns a tuple of stype for the scalar in the top left corner.
  • shape: Recursive len. Parses an n-dimensional object and returns a tuple of sizes.
  • has_shape: Does an object have additional dimensions? (Skalars: No, Strings: No, Empty Iterables: No, Other Iterables: Yes)
  • memory_consumption: Returns the memory consumption of Python objects.

String Tools

  • superstrip : Removes Unicode whitespaces
  • remove_words : Removes stopwords
  • remove_dupwords: Removes dup words from a string whilst-preserving-order
  • longest_substr : Finds the longest common substring in a list of strings
  • random_str : Returns a random string

Release files for bpyth 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bpyth 0.2.2
File Size Uploaded
bpyth-0.2.2.tar.gz 18.8 kB Details

Built distribution (wheel)

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

Total release size: 30.8 kB

Release files / bpyth-0.2.2.tar.gz

Download URL bpyth-0.2.2.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
96ed16ddc534906dbef9ad0eb5c3ce92d41026ed4526acf451d06a89dacd4037
BLAKE2b-256 checksum
How to use checksums
594f98babb43a78cc3bf6aa487a6fcb47d7fdedff59d3332fcb41ce02229a86a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.3 Linux/6.8.0-55-generic

Release files / bpyth-0.2.2-py3-none-any.whl

Download URL bpyth-0.2.2-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bdbf427130ddd7d3f7d63173449fe333612d7b7147da599416e83a9961edf73
BLAKE2b-256 checksum
How to use checksums
1ecd90e9067233be52e2f9bcb0335cc03365542bee0b0f33b320148f59e01dd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.3 Linux/6.8.0-55-generic

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

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