A package to access the co2signal API
Project description
# CO2Signal
A package to access the co2signal API.
Using this package, you can query the latest CO2 intensity in all the countries or regions, available in https://www.electricitymap.org. The package uses the API available via https://co2signal.com. The intensity can be queried using the code below.
```python
import CO2signal
token = "get yours from co2signal.com"
# query using the country code
CO2Signal.get_latest_carbon_intensity(token, country_code='BE')
# query using the location
CO2Signal.get_latest_carbon_intensity(token, longitude=50, latitude=5)
```
A package to access the co2signal API.
Using this package, you can query the latest CO2 intensity in all the countries or regions, available in https://www.electricitymap.org. The package uses the API available via https://co2signal.com. The intensity can be queried using the code below.
```python
import CO2signal
token = "get yours from co2signal.com"
# query using the country code
CO2Signal.get_latest_carbon_intensity(token, country_code='BE')
# query using the location
CO2Signal.get_latest_carbon_intensity(token, longitude=50, latitude=5)
```
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
CO2Signal-0.2.tar.gz
(1.5 kB
view details)
File details
Details for the file CO2Signal-0.2.tar.gz
.
File metadata
- Download URL: CO2Signal-0.2.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82b33c3b62505e7aef19747dc17f44ae28132bdac04b2ba544f8196874733b13 |
|
MD5 | c0ee66005bd89f5bea2be240f739b1de |
|
BLAKE2b-256 | dc5c9c5d6fe506436b5a7f51e630722b9f15d0bdc3d9305e4c61c9f3547770f7 |