https://github.com/one-zero-eight/rooms
API of InNoHassle Rooms
https://github.com/one-zero-eight/rooms
fastapi innohassle python
Last synced: 4 months ago
JSON representation
API of InNoHassle Rooms
- Host: GitHub
- URL: https://github.com/one-zero-eight/rooms
- Owner: one-zero-eight
- License: mit
- Created: 2023-10-16T16:00:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-04T13:53:59.000Z (about 1 year ago)
- Last Synced: 2025-09-21T18:05:16.240Z (9 months ago)
- Topics: fastapi, innohassle, python
- Language: Python
- Homepage:
- Size: 491 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rooms API in InNoHassle ecosystem
## Development
### Getting started
1. Install Python 3.12
2. Install Poetry
3. Install dependencies
```bash
poetry install
```
4. Set up pre-commit hook
```bash
poetry run pre-commit install
```
5. Set up settings file.
```bash
cp example.env .env
```
6. Create postgres database or via Docker.
```bash
docker-compose -f docker-compose-local-db.yaml up -d --build
```
## Run
```bash
poetry run fastapi dev src/main.py
```
### Via Docker
Check the `DB_URL` setting in `.env` file.
```bash
docker build . -t innohassle-rooms-api
```
```bash
docker run --rm -ti -d -p 80:80 --env-file .env innohassle-rooms-api
```
## Usage
Send requests with `X-Token` header (generated by `src.api.auth.utils.create_jwt({'sub': 'tgbot'})`) to verify you
are the [bot](https://github.com/one-zero-eight/rooms-bot/).
[docker-compose-global.yaml](docker-compose-global.yaml) is used to set up all Rooms services.