Skip to content

Commit

Permalink
docs: update README badges
Browse files Browse the repository at this point in the history
  • Loading branch information
amv213 authored May 1, 2024
1 parent 33a3d61 commit a704541
Showing 1 changed file with 17 additions and 23 deletions.
40 changes: 17 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Voltorb ⚡

[![Supported Python versions](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://docs.python.org/3/whatsnew/index.html)
[![Coverage](artefacts/reports/coverage/coverage.svg)](https://coverage.readthedocs.io)
![PyPI - Version](https://img.shields.io/pypi/v/voltorb?color=blue)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/voltorb?color=blue)
![PyPI - Status](https://img.shields.io/pypi/status/voltorb?color=lightgray)
![GitHub License](https://img.shields.io/github/license/amv213/voltorb?color=lightgray)
[![Nox](https://img.shields.io/badge/%F0%9F%A6%8A-Nox-D85E00.svg)](https://github.com/wntrblm/nox)
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff)
Expand All @@ -11,6 +13,7 @@
A simple (unofficial) [Electricity Maps API](https://static.electricitymaps.com/api/docs/index.html) client

---

# Overview

**voltorb** is a simple (unofficial) client to the [Electricity Maps API](https://static.electricitymaps.com/api/docs/index.html).
Expand All @@ -28,8 +31,6 @@ and other applications.
> As such, please be careful if actually using this in production - the package API is still in very early development
> status!
---

# Installation

You can install `voltorb` from the python package index:
Expand All @@ -38,12 +39,6 @@ You can install `voltorb` from the python package index:
pip install voltorb
```

or locally from a clone of this repo:

```shell
pip install -e .
```

# Authentication

An API token is required to query most Electricity Maps API endpoints. If you do not already have one,
Expand All @@ -63,17 +58,18 @@ Use this later as an authentication method when executing your API queries.
> [!TIP]
> To avoid hard-coding secrets, the following recipe uses `python-dotenv` to load the token from a local `.env` file:
>
>```python
>import os
>
>import voltorb
>from dotenv import load_dotenv
>
>load_dotenv()
>
>API_TOKEN = os.environ.get("API_TOKEN")
>auth = voltorb.token_auth(API_TOKEN)
>```
```python
import os

import voltorb
from dotenv import load_dotenv

load_dotenv()

API_TOKEN = os.environ.get("API_TOKEN")
auth = voltorb.token_auth(API_TOKEN)
```


# Quickstart
Expand Down Expand Up @@ -162,8 +158,6 @@ async def main():
asyncio.run(main())
```

---
> [!TIP]
> To make it easier to call `execute()`/`execute_async()` repeatedly with specific arguments, the
> `executor()`/`async_executor()` shortcuts can be used.
Expand Down

0 comments on commit a704541

Please sign in to comment.