Skip to main content

A command line utility to check build usage across multiple Netlify accounts

Project description

Netlify Builds

CI Status Test coverage percentage pre-commit.ci status

Poetry Ruff pre-commit

PyPI Version Supported Python versions License


Source Code: https://github.com/browniebroke/netlify-builds


A command line utility to check build usage across multiple Netlify accounts

Installation

Recommended to install this via pipx:

pipx install netlify-builds

Setup

Create a .netlify-builds.json in your home directory with the following shape:

{
  "team-name-1": "access-token-1",
  "team-name-2": "access-token-2",
  ...
}

To obtain the token for each team, open a private browsing session and login to your team dashboard and copy it from the local storage, it should be located under the key nf-session.

DO NOT LOG OUT. Instead, simply close the private browsing session. If you log out, the token will be invalidated.

Profit

You're good to go, check all your accounts from the comfort of your terminal:

➜ netlify-builds
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━┓
┃ Team              ┃     Mins ┃ Start Date ┃ End Date   ┃ Elapsed ┃  Used ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━┩
│ team-blue         │   5 mins │ 2020-11-16 │ 2020-12-16 │   11.6% │  1.7% │
│ team-red          │ 182 mins │ 2020-10-27 │ 2020-11-27 │   75.9% │ 60.7% │
│ team-green        │  46 mins │ 2020-11-02 │ 2020-12-02 │   58.3% │ 15.3% │
└───────────────────┴──────────┴────────────┴────────────┴─────────┴───────┘

If you're likely to exceed the free quota (300 mins) the rows will appear in red, otherwise in green.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Bruno Alla

💻 📖 🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

This package was created with Cookiecutter and the browniebroke/cookiecutter-pypackage project template.

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

netlify_builds-1.2.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

netlify_builds-1.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file netlify_builds-1.2.0.tar.gz.

File metadata

  • Download URL: netlify_builds-1.2.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for netlify_builds-1.2.0.tar.gz
Algorithm Hash digest
SHA256 14f5a80fdf5f9567ab658815c778b22f46e9cb3d514ebb45128ae011d272cdab
MD5 e4f591f8841e92da831a53dfae04ea14
BLAKE2b-256 0ef24126dca0888244862964a8cf4b9b6c0c0c067e09a04e589acded6a17294c

See more details on using hashes here.

Provenance

The following attestation bundles were made for netlify_builds-1.2.0.tar.gz:

Publisher: ci.yml on browniebroke/netlify-builds

Attestations:

File details

Details for the file netlify_builds-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for netlify_builds-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cb5fa3d0c4d7129720e5b5daea59fb11dd5db13754358e134979339bffb9459
MD5 5b50bbff9af7a895f29042a57b93ca4e
BLAKE2b-256 d7080dae44309dcd68264f64be60b7c537d3f412cf1d78714eff355843c5a6f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for netlify_builds-1.2.0-py3-none-any.whl:

Publisher: ci.yml on browniebroke/netlify-builds

Attestations:

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