https://github.com/sn1f3rt/nervaapi
NervaAPI is a RESTful API server for the Nerva blockchain. It provides a simple interface to interact with the Nerva blockchain using HTTP requests.
https://github.com/sn1f3rt/nervaapi
api blockchain nerva python xnv
Last synced: about 2 months ago
JSON representation
NervaAPI is a RESTful API server for the Nerva blockchain. It provides a simple interface to interact with the Nerva blockchain using HTTP requests.
- Host: GitHub
- URL: https://github.com/sn1f3rt/nervaapi
- Owner: sn1f3rt
- License: gpl-3.0
- Created: 2024-10-26T18:42:54.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-12-15T17:54:44.000Z (5 months ago)
- Last Synced: 2025-03-19T10:57:50.140Z (2 months ago)
- Topics: api, blockchain, nerva, python, xnv
- Language: HTML
- Homepage: https://api.nerva.top
- Size: 197 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# NervaAPI
[](https://github.com/Sn1F3rt/NervaAPI/actions/workflows/ruff.yml)
[](LICENSE)## Table of Contents
- [About](#about)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Configuration](#configuration)
- [Running](#running)
- [License](#license)## About
NervaAPI is a RESTful API server for the Nerva blockchain. It provides a simple interface to interact with the Nerva blockchain using HTTP requests.
## Prerequisites
- Git
- Python >= 3.8
- MongoDB database
- [make](https://www.gnu.org/software/make/) (optional)## Installation
1. Install [`uv`](https://docs.astral.sh/uv/) > https://docs.astral.sh/uv/getting-started/installation/
2. Clone the repository
```shell
git clone https://github.com/Sn1F3rt/NervaAPI.git
```
3. Switch to the project directory```shell
cd NervaAPI
```
4. Create a virtual environment```shell
uv venv # or make env
```
5. Install dependencies```shell
uv sync --no-dev # or make install
```## Configuration
Copy the [`config.example.py`](config.example.py) file to `config.py` and update the variables.
## Running
### Development
```shell
uv run launcher.py # or make dev
```The API server will be running at `http://localhost:8000`.
### Production
```shell
source .venv/bin/activate # or make activate
hypercorn --bind 0.0.0.0:8000 launcher:app
```or if you want to enable SSL support
```shell
source .venv/bin/activate # or make activate
hypercorn --certfile cert.pem --keyfile key.pem --bind 0.0.0.0:8000 launcher:app
```The API server will be running at `http://localhost:8000`. The certificate and key files are required for SSL support.
## License
[GNU General Public License v3.0](LICENSE)
Copyright © 2024 [Sayan "Sn1F3rt" Bhattacharyya](https://sn1f3rt.dev), [The Nerva Project](https://nerva.one)