Skip to main content

LigonLibrary

A Python utility library for working with DataFrames, Google Sheets, fuzzy string matching, and more.

Installation

From PyPI:

pip install ligonlibrary

Or pin in your project's dependencies (e.g. in pyproject.toml):

dependencies = [
    "ligonlibrary>=0.2.1",
]

To install the development version straight from GitHub:

pip install git+https://github.com/ligon/LigonLibrary.git

Requires Python 3.11+.

What's included

DataFrame utilities

  • get_dataframe(f) — Read a DataFrame from nearly any file: CSV, Excel, Parquet, Feather, Stata (.dta), SPSS, fixed-width, org-tables, and GPG-encrypted variants of all of the above.
  • df_to_orgtbl(df) — Render a DataFrame as an Emacs org-mode table, with optional standard errors, confidence intervals, and significance stars.
  • orgtbl_to_df(table) — Parse an org-mode table back into a DataFrame.
  • df_from_orgfile(path) — Read named tables from .org files.
  • from_dta(fn) — Read Stata .dta files with automatic label decoding.
  • normalize_strings(df, ...) — Normalize string columns in a DataFrame.
  • find_similar_pairs(s1, s2) — Find fuzzy-matching pairs between two Series.

Google Sheets

  • read_sheets(key, ...) / read_public_sheet(key) — Read a Google Sheet into a DataFrame.
  • write_sheet(df, key, ...) — Write a DataFrame to a Google Sheet.
  • delete_sheet(key) — Delete a Google Sheet.
  • get_credentials(...) — Load Google service-account credentials (supports GPG-encrypted JSON).

String matching

  • normalized(s) — Normalize a string (case, whitespace, hyphens).
  • similar(a, b) — Check whether two strings are fuzzy-similar.
  • most_similar(s, candidates) — Find the best fuzzy match from a list.

Other

  • email_from_ligon(...) — Send email via the Gmail API.
  • get_password_for_machine(host) — Look up a password in a GPG-encrypted ~/.authinfo.gpg file, with fallback to pass (password-store).

License

BSD 3-Clause. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ligonlibrary-0.2.2.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ligonlibrary-0.2.2-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file ligonlibrary-0.2.2.tar.gz.

File metadata

  • Download URL: ligonlibrary-0.2.2.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ligonlibrary-0.2.2.tar.gz
Algorithm Hash digest
SHA256 86f5764c4169b365a2853701e422a4b4a251383b0b7637e699fbbf9fdacf2ba2
MD5 3e99eb73be0a76c44280244fb4c575c0
BLAKE2b-256 9ea8e05939537038c9548557203e3d62121053c5dfabc57f22e251892d410ff9

See more details on using hashes here.

Provenance

The following attestation bundles were made for ligonlibrary-0.2.2.tar.gz:

Publisher: release.yml on ligon/LigonLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ligonlibrary-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: ligonlibrary-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ligonlibrary-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87c17805ab82785dac3a7ad6b26023eee4079b1077136dcec498de42689be667
MD5 0d64cc6c5d6feb3e90c4c5b147ed9092
BLAKE2b-256 eab921b987ff1b382dab71218ad605fef3a3188ceb29a07e2103359f30646aae

See more details on using hashes here.

Provenance

The following attestation bundles were made for ligonlibrary-0.2.2-py3-none-any.whl:

Publisher: release.yml on ligon/LigonLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.6

2 files

0.1.5

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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