Stuff I often need.
Project description
yootils
Stuff I often need. Also born out of work at the NYT.
Usage
This package is available on PyPI. Run
pip install yootils
to install utilities without any extra external dependencies. To install utilities that require external dependencies, such as those for GCP authentication, inside yootils/google, add an extra, e.g.,
pip install 'yootils[google]'
See all available extras in pyproject.toml.
Development
This project uses uv to manage Python dependencies.
Frequently used commands or groups of commands are defined as Makefile recipes. Run make help to see a list of available recipes.
Setting up system dependencies
Run direnv allow to enable direnv for this project, if you haven't already.
Edit the list of system dependencies in shell.nix. When you're ready, cd again into the project directory. All system dependencies will be installed in a sealed environment specific to your project. This environment will unload if you cd out of the project directory, and reload if you cd back in. Any changes you make to shell.nix, including adding or removing dependencies from the declared packages list automatically sync to your environment every time you hit Enter on the command line.
The Nix package repository is a good place to search for packages you can install (use the unstable channel). If a package isn't available, you can try building it from scratch directly within shell.nix. Here's an example of how to install Vespa
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable";
pkgs = import nixpkgs {
config = {
allowUnfree = true;
};
overlays = [];
};
# Install vespa-cli from source since it isn't available on nixpkgs
# Then you can reference vespa-cli below
vespa-cli = pkgs.stdenv.mkDerivation {
name = "vespa-cli";
version = "8.489.59";
src = pkgs.fetchurl {
url = "https://github.com/vespa-engine/vespa/releases/download/v8.489.59/vespa-cli_8.489.59_darwin_arm64.tar.gz";
sha256 = "sha256-lyRR50CTi4eBYz5zhfFfp/lhFHonb2ruVUOsnJaKaHo=";
};
unpackPhase = "tar -xzf $src";
installPhase = ''
mkdir -p $out/bin
cp vespa-cli_8.489.59_darwin_arm64/bin/vespa $out/bin/vespa
'';
buildPhase = " : "; # No build needed, it's precompiled
};
in
pkgs.mkShellNoCC {
packages = with pkgs; [
vespa-cli # References the vespa-cli derivation created above
];
}
Setting up project dependencies
It's literally as easy as
make install
Running tests
Run
make test
to run all unit and (if available) integration tests.
Code formatting
Applies to Python and (if applicable) Terraform code.
make format
We use Ruff as the formatter for Python. Rules are specified in pyproject.toml.
Code linting
Here, "linting" refers to the process of static-type checking in Python and (if applicable) validation of Terraform configurations.
make lint
We use Pyright as the Python static type checker. Rules are also specified in pyproject.toml.
Deployment
This package is automatically deployed to PyPI when pull request to the main branch is merged and the version number is bumped, via GitHub Actions.
Project details
Release history Release notifications | RSS feed
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 yootils-0.2.6.tar.gz.
File metadata
- Download URL: yootils-0.2.6.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5768ba316f90dc38be0133f84b3a4dae5eb3b06c6134730d65f935863b2e69ca
|
|
| MD5 |
40f617a76525e70fd645d03bbc45dbd3
|
|
| BLAKE2b-256 |
da5c3084fa3d4b0553cf024083a1f65fea91e53b941837e3ea06a4031eb080a2
|
Provenance
The following attestation bundles were made for yootils-0.2.6.tar.gz:
Publisher:
on-merge-to-main.yaml on duynguyen158/yootils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yootils-0.2.6.tar.gz -
Subject digest:
5768ba316f90dc38be0133f84b3a4dae5eb3b06c6134730d65f935863b2e69ca - Sigstore transparency entry: 244877296
- Sigstore integration time:
-
Permalink:
duynguyen158/yootils@61c300d9af982d60b5d74b80aad5849748c5dea2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/duynguyen158
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
on-merge-to-main.yaml@61c300d9af982d60b5d74b80aad5849748c5dea2 -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file yootils-0.2.6-py3-none-any.whl.
File metadata
- Download URL: yootils-0.2.6-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d4e7c04341453d2ab12956c87657d6bbb2fd211fc1ffc6eda1e1d8da1542cf7
|
|
| MD5 |
37c8afa06842365b51add4a7dfb245e3
|
|
| BLAKE2b-256 |
3008ab76aad1a3bdbefd0da8754c5ba241d17516c042c0704bba05d23227d588
|
Provenance
The following attestation bundles were made for yootils-0.2.6-py3-none-any.whl:
Publisher:
on-merge-to-main.yaml on duynguyen158/yootils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yootils-0.2.6-py3-none-any.whl -
Subject digest:
6d4e7c04341453d2ab12956c87657d6bbb2fd211fc1ffc6eda1e1d8da1542cf7 - Sigstore transparency entry: 244877299
- Sigstore integration time:
-
Permalink:
duynguyen158/yootils@61c300d9af982d60b5d74b80aad5849748c5dea2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/duynguyen158
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
on-merge-to-main.yaml@61c300d9af982d60b5d74b80aad5849748c5dea2 -
Trigger Event:
pull_request
-
Statement type: