Skip to main content

Tools for Python scripts or terminal

Project description

invesytoolbox

A set of useful tools, created for my own convenience.

Why "invesy"? Invesy (from German Inhaltsverwaltungssystem == content management system) is a closed source cms I created with Thomas Macher. It's only used in-house, that's why we didn't bother making it open source.

Invesy runs on Zope, so most of the individual website's logic runs in restricted Python. That's one reason for this toolbox: providing a set of useful functions in one single package which can be allowed in our restricted Python environment without having to allow a long list of external packages. Also some packages, while being importable, contain functions or methods not usable in restricted Python (like bs4's prettify).

That's also why all date and time functions also take into account the old DateTime (as opposed to datetime) package, on which Zope is still relying upon heavily.

The documentation can be found here.

History

0.0.17 (2023-03-01)

  • new function compare_phonenumbers: compares two phone numbers after normalizing them (process_phonenumber).

0.0.16

  • map_special_chars: works now.

0.0.15

  • could_be_a_name: can now handle names with multiple parts like "Robert De La Mancha". Per word, 2 capitals are allowed (i.e. "MacArthur" or "DeLa Cruz)

0.0.14

  • could_be_a_name and sort_names: now working also with prename-only and prenames including a hyphen.

0.0.13

  • get_dateformat now also processes time
  • str_to_dt now checks for valid string
  • is_valid_datetime_string: wrapper for checking with str_to_dt
  • remove_time from datetime or DateTime

0.0.12

  • removed documentation from the README file, instead a link to the gitlab pages
  • map_specialChars now recognizes Unicode character U+0308 (UTF-8 cc 88 = "COMBINING DIAERESIS").
  • any_2boolean
  • get_dateformat: argument checkonly
  • data functions: argument json_data changed to metadata (it's a dictionary)

0.0.11

  • BeautifulSoup and nameparser added to requirements.txt
  • Removed "Date" conversions (modified DateTime) because it's a bad idea
  • normalize_name (using nameparser) added to itb_text_name
  • capitalize_name rewritten (now quasi a wrapper for normalize_name)
  • could_be_a_name rewritten using normalize_name (nameparser)

0.0.10

  • check_spam for web forms
  • dictlist_2datatypes: iterates through a list of dictionaries and applies dict_2datatypes
  • prettify_html: provides prettify from BeautifulSoup, because it can't be used directly from restricted Python.
  • could_be_a_name: checks if a string could be a name

0.0.9

  • change_query_string respects Zope parameter converters (like paramname:int)

0.0.8

  • New submodule www
    • change_query_string

0.0.7

  • shorter submodule names (no _tools suffix)
  • is_holiday works without argument
  • create_email_message: new argument encoding
  • process_phonenumbers: cleaned up arguments
  • DT_date: strip a DateTime of its time (get a "naked" date)
  • could_be_a_name: check if a string could possibly be a name

0.0.6

  • renamed capitalize_text to capitalize_name and removed name argument
  • added Sphinx documentation

0.0.5 (2022-06-11)

  • removed terminal_tools (will be included in a separate package)

0.0.4 (2022-06-09)

  • better formatted README

0.0.3 (2022-06-09)

  • updated README (list of functions and a short description)

0.0.2 (2022-06-09)

  • removed VERSION file

0.0.1 (2022-06-09)

  • first version

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

invesytoolbox-0.0.17.tar.gz (30.5 kB view hashes)

Uploaded Source

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