Skip to content

freifunk/openwifimap-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

openwifimap-api (Python)

OpenWiFiMap is a database and map for free network WiFi routers (freifunk and others, too!).

This is the database/backend part of the openwifimap. Make sure to also take a look at its web frontend, the openwifimap HTML5 app.

The original backend was written in Javascript using CouchDB. Since maintaining that was problematic, it was rewritten in 2020/2021 to use Python/FastAPI/PostgreSQL.

API

See the Swagger API docs at /docs on the running backend (at api.openwifimap.net/docs, for example).

The somewhat more verbose old API doc can be found in the old API.md.

License

openwifimap is licensed under the MIT license.

Development info

The backend is basically keeping a list of JSON documents on disk which can get queried and updated via a web API. The database is used as search index only. PostgreSQL is total overkill for this but ¯_(ツ)_/¯

The interesting part of the code is in restapi.py.

In case you wonder, endpoint definitions are a bit complicated (BaseModel, response_model, Field, Query, ...) since FastAPI can generate nice Swagger API docs from this.

Dev notes

About

OpenWiFiMap database and its api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages