generated from nathanwoodburn/python-webserver-template
This commit is contained in:
65
README.md
65
README.md
@@ -1,19 +1,56 @@
|
|||||||
# Python Flask Webserver Template
|
# Fire HSD - Public Handshake API
|
||||||
|
|
||||||
Python3 website template including git actions
|
A Python Flask webserver providing a free public API for the [Handshake](https://handshake.org/) blockchain.
|
||||||
|
|
||||||
# Development
|
## Features
|
||||||
1. Install requirements
|
|
||||||
```bash
|
- Query blocks, headers, transactions, coins, and names from a public HSD node
|
||||||
python3 -m pip install -r requirements.txt
|
- No authentication required for read-only endpoints
|
||||||
|
- Fast, simple, and open source ([AGPLv3](./LICENSE))
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
1. **Install requirements**
|
||||||
|
```bash
|
||||||
|
python3 -m pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
2. **Run the dev server**
|
||||||
|
```bash
|
||||||
|
python3 server.py
|
||||||
|
```
|
||||||
|
3. **Production (Gunicorn)**
|
||||||
|
```bash
|
||||||
|
python3 main.py
|
||||||
|
```
|
||||||
|
|
||||||
|
## API Endpoints
|
||||||
|
|
||||||
|
Some examples:
|
||||||
|
- `/api/v1/status` — Check HSD node status
|
||||||
|
- `/api/v1/block/<blockid>` — Get block data by block id
|
||||||
|
- `/api/v1/header/<blockid>` — Get header data by block id
|
||||||
|
- `/api/v1/tx/<txid>` — Get transaction info
|
||||||
|
- `/api/v1/name/<name>` — Get name info
|
||||||
|
- `/api/v1/help` — List all API endpoints
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Set environment variables in `.env` or use `example.env`:
|
||||||
```
|
```
|
||||||
2. Run the dev server
|
HSD_HOST=127.0.0.1
|
||||||
```bash
|
HSD_API_KEY=APIKEY
|
||||||
python3 server.py
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Production
|
## Support & Donations
|
||||||
Run using the main.py file
|
|
||||||
```bash
|
If you'd like to help keep the service running and growing, consider donating:
|
||||||
python3 main.py
|
|
||||||
```
|
- [PayPal](https://paypal.me/nathanwoodburn)
|
||||||
|
- [Card (Stripe)](https://donate.stripe.com/8wM6pv0VD08Xe408ww)
|
||||||
|
- [HNS, BTC, or other](https://nathan.woodburn.au/donate)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[GNU AGPLv3](./LICENSE)
|
||||||
|
|
||||||
|
© 2025 Nathan Woodburn
|
||||||
@@ -80,8 +80,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
© 2025 Nathan Woodburn — <a href="https://git.woodburn.au/nathanwoodburn/firehsd"
|
© 2025 <a href="https://nathan.woodburn.au" style="color: #aaa;" target="_blank">Nathan.Woodburn/</a>
|
||||||
style="color:#aaa;">Source</a>
|
— <a href="https://git.woodburn.au/nathanwoodburn/firehsd" style="color:#aaa;" target="_blank">Source</a>
|
||||||
</footer>
|
</footer>
|
||||||
<script>
|
<script>
|
||||||
function renderApiEndpoints(apiList) {
|
function renderApiEndpoints(apiList) {
|
||||||
|
|||||||
Reference in New Issue
Block a user