Skip to content

geopython/pygeoapi-auth

Repository files navigation

pygeoapi-auth

Python package to manage pygeoapi authorization

Installation

pygeoapi-auth is best installed and used within a Python virtualenv.

Requirements

Dependencies

Dependencies are listed in requirements.txt. Dependencies are automatically installed during pygeoapi-auth's installation.

Installing the Package

python3 -m venv my-env
cd my-env
. bin/activate
git clone https://github.com/geopython/pygeoapi-auth.git
cd pygeoapi-auth
python3 setup.py install

Running

From the command line

# show all subcommands
pygeoapi-auth

# inject authorization into OpenAPI using Authelia
pygeoapi-auth openapi inject-auth local-openapi.yml authelia authelia-conf.yml

# inject authorization into OpenAPI using Authelia with an API prefix
pygeoapi-auth openapi inject-auth local-openapi.yml authelia authelia-conf.yml --api-prefix api 

# inject authorization into OpenAPI using Authelia with an API prefix, writing to file
pygeoapi-auth openapi inject-auth local-openapi.yml authelia authelia-conf.yml --api-prefix api --output-file openapi-auth.yml

# if installed in the pygeoapi deployment environment, run as a plugin!
pygeoapi plugins openapi inject-auth local-openapi.yml authelia authelia-conf.yml --api-prefix api --output-file openapi-auth.yml

Using the API from Python

TODO

Development

Setting up a Development Environment

Same as installing a package. Use a virtualenv. Also install developer requirements:

pip3 install -r requirements-dev.txt

Running Tests

# via setuptools
python3 setup.py test
# manually
cd tests
python3 run_tests.py

Releasing

# update version
vi pygeoapi_auth/__init__.py
git commit -m 'update release version' pygeoapi_auth/__init__.py
# push changes
git push origin master
git tag -a x.y.z -m 'tagging release x.y.z'
# push tag
git push --tags
rm -fr build dist *.egg-info
python3 setup.py sdist bdist_wheel --universal
twine upload dist/*

Code Conventions

Bugs and Issues

All bugs, enhancements and issues are managed on GitHub.

Contact

About

Python package to manage pygeoapi authorization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages