pyramid-ogcapi


Namepyramid-ogcapi JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/camptocamp/pyramid-ogcapi
SummaryBuild pyramid routes, provide template for user html pages
upload_time2023-10-05 14:29:50
maintainer
docs_urlNone
authorStéphane Brunner
requires_python>=3.9,<3.12
licenseBSD-2-Clause
keywords ogcapi openapi pyramid
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```bash
python3 -m pip install pyramid-ogcapi
```

## Getting started

Get the OGC API bundled specifications from the [OGC GitHub organization](https://github.com/opengeospatial/),
and save it as `ogcapi-bundled.json`.

Add in your configuration:

```python
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](https://pypi.org/project/jsonschema-gentypes/).

Add the following views:

```python

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](https://pypi.org/project/jsonschema-gentypes/)

## Start example

Run the example:

```bash
make run
```

Open the [Swagger UI](http://localhost:9123/ogcapi/docs/).

Open the [OpenAPI main page](http://localhost:9123/ogcapi/).

## Contributing

Install the pre-commit hooks:

```bash
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`.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/camptocamp/pyramid-ogcapi",
    "name": "pyramid-ogcapi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<3.12",
    "maintainer_email": "",
    "keywords": "ogcapi,openapi,pyramid",
    "author": "St\u00e9phane Brunner",
    "author_email": "stephane.brunner@camptocamp.com",
    "download_url": "https://files.pythonhosted.org/packages/57/4a/3a28584e7811b80e252d6c669039673c93f5dd9c1dd47c5eef03cc67022b/pyramid_ogcapi-0.2.1.tar.gz",
    "platform": null,
    "description": "# Pyramid OGC API\n\nTools used to facilitate the development of OGC API services with Pyramid.\nProvide template the the HTML vies of the API, have a generic one for la kind of view.\nAutomatically create the routes and the views based on the OpenAPI 3 specification file and the OGC API common consideration.\nProvide some functions to facilitate the create of the template.\nProvide some functions to facilitate the create of the api.\nProvide some functions to facilitate the creation od an OpenLayers Map.\n\nOGC API common consideration that we will consider to create some facilitation:\n\n- The f argument to switch between the HTML and the JSON view.\n- The link definition.\n- The paging definition.\n\nIt will also provide an example of the OGC API Feature service with:\n\n- The crs parameter..\n- The CQL filter based on (pygeofiler)[https://pypi.org/project/pygeofilter/].\n- The CRUD interface.\n\n## Installation\n\n```bash\npython3 -m pip install pyramid-ogcapi\n```\n\n## Getting started\n\nGet the OGC API bundled specifications from the [OGC GitHub organization](https://github.com/opengeospatial/),\nand save it as `ogcapi-bundled.json`.\n\nAdd in your configuration:\n\n```python\nconfig.include(\"pyramid_ogcapi\")\nconfig.pyramid_openapi3_spec('ogcapi-bundled.json', apiname='ogcapi')\nconfig.pyramid_openapi3_add_explorer(apiname='ogcapi')\nconfig.pyramid_ogcapi_register_routes(apiname='ogcapi')\n```\n\nIntegrate with [jsonschema_gentypes](https://pypi.org/project/jsonschema-gentypes/).\n\nAdd the following views:\n\n```python\n\nfrom pyramid import view_config\nfrom pyramid_ogcapi import request_dict\nfrom .ogcapi import OgcapiCollectionsCollectionidGet, OgcapiCollectionsCollectionidGetResponse\n\n@request_dict\ndef myview(\n  request: pyramid.request.Request,\n  request_typed: OgcapiCollectionsCollectionidGet,\n) -> OgcapiCollectionsCollectionidGetResponse:\n    return {...}\n\n```\n\nIntegrate with [jsonschema_gentypes](https://pypi.org/project/jsonschema-gentypes/)\n\n## Start example\n\nRun the example:\n\n```bash\nmake run\n```\n\nOpen the [Swagger UI](http://localhost:9123/ogcapi/docs/).\n\nOpen the [OpenAPI main page](http://localhost:9123/ogcapi/).\n\n## Contributing\n\nInstall the pre-commit hooks:\n\n```bash\npip install pre-commit\npre-commit install --allow-missing-config\n```\n\nThe `prospector` tests should pass.\n\nThe code should be typed.\n\nThe code should be tested with `pytests`.\n\n",
    "bugtrack_url": null,
    "license": "BSD-2-Clause",
    "summary": "Build pyramid routes, provide template for user html pages",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/camptocamp/pyramid-ogcapi",
        "Repository": "https://github.com/camptocamp/pyramid-ogcapi"
    },
    "split_keywords": [
        "ogcapi",
        "openapi",
        "pyramid"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49772b5947c6abb35096fd410cebd780b8c6889e5da0f2d71c0a39e795689662",
                "md5": "afcf1629400578e6f25eeac903ff43e2",
                "sha256": "8e987cd2bee491232d2b8b99a93f3112308f570f0d9b8f4f32cd43e05f7713e0"
            },
            "downloads": -1,
            "filename": "pyramid_ogcapi-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "afcf1629400578e6f25eeac903ff43e2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<3.12",
            "size": 12116,
            "upload_time": "2023-10-05T14:29:14",
            "upload_time_iso_8601": "2023-10-05T14:29:14.170065Z",
            "url": "https://files.pythonhosted.org/packages/49/77/2b5947c6abb35096fd410cebd780b8c6889e5da0f2d71c0a39e795689662/pyramid_ogcapi-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "574a3a28584e7811b80e252d6c669039673c93f5dd9c1dd47c5eef03cc67022b",
                "md5": "bcb66bb1d32861ee770abe4369ab8b9c",
                "sha256": "19badd5cad9e22ebe2c709e7570c7e3e74b8f65b71dfb12aa0c4b4e982871ea7"
            },
            "downloads": -1,
            "filename": "pyramid_ogcapi-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "bcb66bb1d32861ee770abe4369ab8b9c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<3.12",
            "size": 11901,
            "upload_time": "2023-10-05T14:29:50",
            "upload_time_iso_8601": "2023-10-05T14:29:50.109719Z",
            "url": "https://files.pythonhosted.org/packages/57/4a/3a28584e7811b80e252d6c669039673c93f5dd9c1dd47c5eef03cc67022b/pyramid_ogcapi-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-05 14:29:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "camptocamp",
    "github_project": "pyramid-ogcapi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pyramid-ogcapi"
}
        
Elapsed time: 0.77062s