Skip to content

A FastAPI application leveraged by pygeoapi

License

Notifications You must be signed in to change notification settings

cartologic/fastgeoapi

 
 

Repository files navigation

fastgeoapi

A FastAPI application leveraged by pygeoapi

PyPI Status Python Version License

Read the documentation at https://fastgeoapi.readthedocs.io/ Tests Codecov

pre-commit Black Poetry

Architecture

This diagram gives an overview of the basic architecture:

general architecture

Features

  • Provide authentication and authorization for vanilla pygeoapi

Requirements

  • pygeoapi
  • fastapi-opa
  • An OpenID Connect provider (Keycloak, WSO2, etc)
  • Open Policy Agent (OPA)

Installation

You can install fastgeoapi via pip from PyPI:

pip install fastgeoapi

Development

After cloning the repository, you should use poetry to create the virtual environment and install the dependencies:

poetry shell
poetry install

Once Keycloak and OPA have been started then you have to configure the required variables for the pygeoapi configuration:

export PYGEOAPI_CONFIG=example-config.yml
export PYGEOAPI_OPENAPI=example-openapi.yml

Finally, you can start fastgeoapi in development mode:

uvicorn app.main:app --port 5000 --loop asyncio --reload

Usage

Please see the Command-line Reference for details.

Please have a look at the docker-compose.yml file under scripts/iam to start the stack with Keycloak and Open Policy Agent locally. There is a README.md file that explains how to use it.

The file scripts/iam/keycloak/realm-export.json can be used to import an already configured realm into Keycloak.

The files under scripts/postman can be used to setup Postman with a configuration that is ready to perform the requests for the whole stack.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, fastgeoapi is free and open-source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.

About

A FastAPI application leveraged by pygeoapi

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.0%
  • Dockerfile 4.9%
  • Open Policy Agent 3.1%