https://github.com/openclimatefix/india-api
API India solar and wind data
https://github.com/openclimatefix/india-api
Last synced: about 1 year ago
JSON representation
API India solar and wind data
- Host: GitHub
- URL: https://github.com/openclimatefix/india-api
- Owner: openclimatefix
- Created: 2023-12-20T17:13:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-04T16:05:01.000Z (about 1 year ago)
- Last Synced: 2025-04-04T16:32:16.759Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 188 KB
- Stars: 5
- Watchers: 1
- Forks: 22
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# India API
[](#contributors-)
Defines an API to help with building frontends pertaining to displaying wind and solar data.
## Running the service
### Configuration
The application is configured via the use of environment variables.
For the environment variable please set: DB_URL in bash
Currently there is only one source adaptor
so there is nothing to configure.
### Using docker
You can either download the latest image from GitHub container registry:
```sh
$ docker run ghcr.io/openclimatefix/india-api:latest
```
Or build and run locally using the Containerfile:
```sh
$ docker build -t india-api .
$ docker run india-api
```
### Using python(v3.11.x)
Clone the repository,
and create a new virtual environment with your favorite environment manager.
Install the dependencies with
```
$ pip install -e .
```
The service is then runnable via the command `india-api`.
You should see the following output:
```shell
INFO: Started server process [87312]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
```
The API should then be accessible at `http://localhost:8000`,
and the docs at `http://localhost:8000/docs`.
## Development
Clone the repository,
and create a new environment with your favorite environment manager.
Install all the dependencies with
```
pip install -e ".[all]"
```
You can run the service with the command `india-api`.
Changes will be hot-reloaded by the server.
## Running Tests
Make sure that you have ```pytest```
and ```testcontainers``` installed.
Then run the tests using
```
pytest
```
## Known Bugs
There may be some issues when
installing this with windows.
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Rahul Maurya
💻

Dubraska Solórzano
💻

Nicholas Tucker
💻

devsjc
💻

Suvan Banerjee
💻

Anas Khan
🚇
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!