OrKa-Vector-API
The OrKa Vector REST API
Install
Requires a postgres database with postgis extension installed.
pip install orka-vector-api
Development
Run Dev Server
FLASK_APP=orka_vector_api FLASK_ENV=development flask run
Configs
config.py
A config.py must be added to the instance folder
that allows following additional configs:
PG_USER- username of the user that has access to the vector layersPG_PASSWORD= password of the userPG_HOST= database hostPG_PORT= database portPG_DATABASE= database nameORKA_DB_USER= application database usernameORKA_DB_PASSWORD= application database passwordORKA_DB_HOST= application database hostORKA_DB_PORT= application database portORKA_DB_DATABASE= application database nameORKA_DB_SCHEMA= application database schemaORKA_DB_MIN_CONNECTION= application database min connectionsORKA_DB_MAX_CONNECTION= application database max connectionsORKA_GPKG_PATH= path to where the created gpkg files should be placedORKA_LAYERS_PATH= path to folder containing the layer sqls. This folder must be located within the instance folderORKA_THREAD_TIMEOUT= timeout in seconds after which a running thread should be killed.ORKA_MAX_THREADS= number of allowed threadsORKA_LOG_FILE= path to log fileORKA_STYLE_PATH= path to the file that contains all styles, etc.ORKA_STYLE_FILE= name of the zip file (including.zip) that contains all styles, etc.ORKA_LAYER_GROUPS_FILE= name of the json file (including.json) that contains the configuration for layer groups.ORKA_MAX_BBOX= maximum allowed size of the bbox in sqkm.ORKA_LOG_LEVEL= log levelORKA_APP_PORT= the port under which the app is running on
Example config.py:
PG_USER = 'user'
PG_PASSWORD = 'password'
PG_HOST = 'localhost'
PG_PORT = 5432
PG_DATABASE = 'postgres'
ORKA_DB_USER = 'user2'
ORKA_DB_PASSWORD = 'password2'
ORKA_DB_HOST = 'localhost'
ORKA_DB_PORT = 5555
ORKA_DB_DATABASE = 'postgres'
ORKA_DB_SCHEMA = 'public'
ORKA_DB_MIN_CONNECTION = 1
ORKA_DB_MAX_CONNECTION = 1
ORKA_GPKG_PATH = 'data/'
ORKA_LAYERS_PATH = 'layers/'
ORKA_THREAD_TIMEOUT = 60
ORKA_MAX_THREADS = 4
ORKA_LOG_FILE = '/var/log/orka_vector_api/orka_vector_api.log'
ORKA_LOG_LEVEL = 'WARNING'
ORKA_STYLE_PATH = 'styles/'
ORKA_STYLE_FILE = 'style.zip'
ORKA_LAYER_GROUPS_FILE = 'groups.json'
ORKA_MAX_BBOX = 23211
ORKA_APP_PORT = 5000
Publishing
- update version number in setup.py and orka_vector_api/init.py
- run following commands:
python3 -m venv venv_publish
source venv_publish/bin/activate
pip install -r requirements_publish.txt
python setup.py sdist bdist_wheel
# make sure following command prints 'passed' on all files in dist/
twine check dist/*
twine upload dist/*
Metadata
Release files for orka-vector-api 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| orka_vector_api-0.1.0.tar.gz | 15.9 kB | Without provenance | Details for orka_vector_api-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| orka_vector_api-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for orka_vector_api-0.1.0-py3-none-any.whl |
Total release size: 34.0 kB
Release files / orka_vector_api-0.1.0.tar.gz
| Download URL | orka_vector_api-0.1.0.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c1a529c9ee1d56d5094e39c3ebfabe6ec5ef61432e34622f5bc4f395d71b682
|
|
BLAKE2b-256 checksum How to use checksums |
306f5dc5e51747a55d5b286cb5721fe8b2fd29513cd930d06857e3946d3a98b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10
|
Release files / orka_vector_api-0.1.0-py3-none-any.whl
| Download URL | orka_vector_api-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6691408725b672a08a79ffe4e52a4511f67e4883cf574c94044793df6e981c7b
|
|
BLAKE2b-256 checksum How to use checksums |
213f2d443bc0468fac9bc0ae4279542023e158b7ef7d00bd1d0d61a0e9d06552
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10
|
Security for orka-vector-api 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.