Utilities for DataFrames, Google Sheets, fuzzy string matching, GPG-encrypted credentials, and other little hacks.
Project description
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.orgfiles.from_dta(fn)— Read Stata.dtafiles 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.gpgfile, with fallback topass(password-store).
License
BSD 3-Clause. See LICENSE.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ligonlibrary-0.2.1.tar.gz.
File metadata
- Download URL: ligonlibrary-0.2.1.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
671a149e8f10193e34d136666714a12d2f7cc864d76d43ae893a0e23df5e444d
|
|
| MD5 |
c33254a0e1956fb67e000e2188bc4661
|
|
| BLAKE2b-256 |
cdf5bbcb5240b8d21ef08df01b7d4c7537538495da62dc392994d4668069992e
|
Provenance
The following attestation bundles were made for ligonlibrary-0.2.1.tar.gz:
Publisher:
release.yml on ligon/LigonLibrary
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ligonlibrary-0.2.1.tar.gz -
Subject digest:
671a149e8f10193e34d136666714a12d2f7cc864d76d43ae893a0e23df5e444d - Sigstore transparency entry: 1598665314
- Sigstore integration time:
-
Permalink:
ligon/LigonLibrary@462c9c8c9542b40f0e692589107bdede395cdf7e -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/ligon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@462c9c8c9542b40f0e692589107bdede395cdf7e -
Trigger Event:
push
-
Statement type:
File details
Details for the file ligonlibrary-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ligonlibrary-0.2.1-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3561b9f80aa65b897daa5adf636d8a4f7f52f0d0b345331ffc1901db3aafb397
|
|
| MD5 |
25fb9c2db9b04426b2f0fa6d8e72dfee
|
|
| BLAKE2b-256 |
3798c235aa7822cc90534e94f6a88deb201d5d4f6d5e393b86692355086e9903
|
Provenance
The following attestation bundles were made for ligonlibrary-0.2.1-py3-none-any.whl:
Publisher:
release.yml on ligon/LigonLibrary
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ligonlibrary-0.2.1-py3-none-any.whl -
Subject digest:
3561b9f80aa65b897daa5adf636d8a4f7f52f0d0b345331ffc1901db3aafb397 - Sigstore transparency entry: 1598665422
- Sigstore integration time:
-
Permalink:
ligon/LigonLibrary@462c9c8c9542b40f0e692589107bdede395cdf7e -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/ligon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@462c9c8c9542b40f0e692589107bdede395cdf7e -
Trigger Event:
push
-
Statement type: