Pyramid OGC API
Tools used to facilitate the development of OGC API services with Pyramid. Provide template the the HTML vies of the API, have a generic one for la kind of view. Automatically create the routes and the views based on the OpenAPI 3 specification file and the OGC API common consideration. Provide some functions to facilitate the create of the template. Provide some functions to facilitate the create of the api. Provide some functions to facilitate the creation od an OpenLayers Map.
OGC API common consideration that we will consider to create some facilitation:
- The f argument to switch between the HTML and the JSON view.
- The link definition.
- The paging definition.
It will also provide an example of the OGC API Feature service with:
- The crs parameter..
- The CQL filter based on (pygeofiler)[https://pypi.org/project/pygeofilter/].
- The CRUD interface.
Installation
python3 -m pip install pyramid-ogcapi
Getting started
Get the OGC API bundled specifications from the OGC GitHub organization,
and save it as ogcapi-bundled.json.
Add in your configuration:
config.include("pyramid_ogcapi")
config.pyramid_openapi3_spec('ogcapi-bundled.json', apiname='ogcapi')
config.pyramid_openapi3_add_explorer(apiname='ogcapi')
config.pyramid_ogcapi_register_routes(apiname='ogcapi')
Integrate with jsonschema_gentypes.
Add the following views:
from pyramid import view_config
from pyramid_ogcapi import request_dict
from .ogcapi import OgcapiCollectionsCollectionidGet, OgcapiCollectionsCollectionidGetResponse
@request_dict
def myview(
request: pyramid.request.Request,
request_typed: OgcapiCollectionsCollectionidGet,
) -> OgcapiCollectionsCollectionidGetResponse:
return {...}
Integrate with jsonschema_gentypes
Start example
Run the example:
make run
Open the Swagger UI.
Open the OpenAPI main page.
Contributing
Install the pre-commit hooks:
pip install pre-commit
pre-commit install --allow-missing-config
The prospector tests should pass.
The code should be typed.
The code should be tested with pytests.
Metadata
Release files for pyramid-ogcapi 0.2.1
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 | |
|---|---|---|---|---|
| pyramid_ogcapi-0.2.1.tar.gz | 11.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyramid_ogcapi-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.0 kB
Release files / pyramid_ogcapi-0.2.1.tar.gz
| Download URL | pyramid_ogcapi-0.2.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19badd5cad9e22ebe2c709e7570c7e3e74b8f65b71dfb12aa0c4b4e982871ea7
|
|
BLAKE2b-256 checksum How to use checksums |
574a3a28584e7811b80e252d6c669039673c93f5dd9c1dd47c5eef03cc67022b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / pyramid_ogcapi-0.2.1-py3-none-any.whl
| Download URL | pyramid_ogcapi-0.2.1-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e987cd2bee491232d2b8b99a93f3112308f570f0d9b8f4f32cd43e05f7713e0
|
|
BLAKE2b-256 checksum How to use checksums |
49772b5947c6abb35096fd410cebd780b8c6889e5da0f2d71c0a39e795689662
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for pyramid-ogcapi 0.2.1
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.