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

Uploaded Source

Built Distribution

netlify_builds-1.1.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netlify_builds-1.1.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for netlify_builds-1.1.2.tar.gz
Algorithm Hash digest
SHA256 37f984c0239f1891c2a9307b8e7f1e07152f1ce1779955b50b6361b976fa6274
MD5 b70a0c5a2e2cae61712a8812939e35c2
BLAKE2b-256 f3ae0f7ef54d6c0baa6c947b5f29694bb28483a21952dbdb939c8855ca24b756

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for netlify_builds-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8c781a5d9d58d4f02d34f57b13674a2f0d6ee86b85d0be73525a3695c26b5a16
MD5 070641dd899a539d95f1f27345a45dc4
BLAKE2b-256 bbb1fcdcfc4f964ae855b925bb54fa5a947ba49b120054a34de00515ecbcdf30

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