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 black pre-commit

PyPI Version Supported Python versions License

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-0.2.6.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

netlify_builds-0.2.6-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file netlify-builds-0.2.6.tar.gz.

File metadata

  • Download URL: netlify-builds-0.2.6.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.4 keyring/23.5.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.13

File hashes

Hashes for netlify-builds-0.2.6.tar.gz
Algorithm Hash digest
SHA256 53e5003b2a093ea0af05e1308a0c68008200e5cd12ad6e20205d84cccd339b34
MD5 30b85e75e8fede39be6bb506e5b56138
BLAKE2b-256 6d1d127eefdbb814e88c939a83e853ab8e3f2935d741e352d50cd651ed0f1d1c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: netlify_builds-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.4 keyring/23.5.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.13

File hashes

Hashes for netlify_builds-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e1205580e4001bcd9742bbc041acde65388131963f560934b447bd46b3126cf8
MD5 9feb56bae1702831f4c3ab692e92cf67
BLAKE2b-256 7f01c47432f38e25198e5d5b5ed8d7b14d854759bc8d04a1185c353160f96e0b

See more details on using hashes here.

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