geometry-api-v2


Namegeometry-api-v2 JSON
Version 1.7.0 PyPI version JSON
download
home_pagehttps://shapediver.com/
SummarySDK to communicate with the ShapeDiver Geometry API version 2
upload_time2024-12-18 08:57:12
maintainerNone
docs_urlNone
authorShapeDiver
requires_python>=3.9
licenseMIT
keywords shapediver gb-api sdk
VCS
bugtrack_url
requirements urllib3 python_dateutil pydantic typing-extensions
Travis-CI No Travis.
coveralls test coverage
            .. These are examples of badges you might want to add to your README:
   please update the URLs accordingly

    .. image:: https://api.cirrus-ci.com/github/<USER>/geometry_api_v2.svg?branch=main
        :alt: Built Status
        :target: https://cirrus-ci.com/github/<USER>/geometry_api_v2
    .. image:: https://readthedocs.org/projects/geometry_api_v2/badge/?version=latest
        :alt: ReadTheDocs
        :target: https://geometry_api_v2.readthedocs.io/en/stable/
    .. image:: https://img.shields.io/coveralls/github/<USER>/geometry_api_v2/main.svg
        :alt: Coveralls
        :target: https://coveralls.io/r/<USER>/geometry_api_v2
    .. image:: https://img.shields.io/pypi/v/geometry_api_v2.svg
        :alt: PyPI-Server
        :target: https://pypi.org/project/geometry_api_v2/
    .. image:: https://img.shields.io/conda/vn/conda-forge/geometry_api_v2.svg
        :alt: Conda-Forge
        :target: https://anaconda.org/conda-forge/geometry_api_v2
    .. image:: https://pepy.tech/badge/geometry_api_v2/month
        :alt: Monthly Downloads
        :target: https://pepy.tech/project/geometry_api_v2
    .. image:: https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter
        :alt: Twitter
        :target: https://twitter.com/geometry_api_v2

.. image:: https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold
    :alt: Project generated with PyScaffold
    :target: https://pyscaffold.org/

|

===============
geometry_api_v2
===============


    SDK to communicate with the ShapeDiver Geometry API version 2


`ShapeDiver <https://www.shapediver.com/>`_ is a cloud platform for building online applications
based on parametric 3D files made with `Rhinoceros 3D <https://www.rhino3d.com/>`_ and `Grasshopper
<https://www.grasshopper3d.com/>`_.

Using the **ShapeDiver Geometry Backend API** allows access to ShapeDiver models without using the
**ShapeDiver Viewer**. This SDK provides functionality to communicate with the Geometry Backend API
**version 2**, and includes type hints describing request and response data objects. See the
`API documentation <https://sdeuc1.eu-central-1.shapediver.com/api/v2/docs/>`_ for more details.


Authentication
==============

The authentication system for the Geometry Backend API is based on **ticket objects** and **JWT
tokens**, which are handled by the `ShapeDiver Platform <https://www.shapediver.com/app/>`_. You can
obtain **tickets** and **JWT tokens** by:

- using your account on the `ShapeDiver Platform <https://www.shapediver.com/app/>`_ (tickets only),
  or

- you can obtain them programmatically using the `ShapeDiver Platform API
  <https://app.shapediver.com/api/documentation>`_ (both tickets and JWT tokens).

An SDK for the `ShapeDiver Platform API <https://app.shapediver.com/api/documentation>`_ will be
released soon.

When obtaining a ticket for your model from the ShapeDiver Platform, please be aware that you will
need a *ticket for backend access*, since you are accessing the Geometry Backend API from an
arbitrary client application that is not a web browser. For more details see the `ShapeDiver
Help Center developer settings <https://help.shapediver.com/doc/developers-settings>`_


Base URL
========

The base URL to use depends on which ShapeDiver Geometry Backend System your model was uploaded to.
You can find the base URL in your model's dashboard on the ShapeDiver Platform, it is also called
the *model view url*.


Usage - Ticket only
===================
::

    from shapediver.geometry_api_v2 import SdClient, Configuration, SessionApi

    def init_session():
        # Please see above on how to obtain a ticket
        ticket = "8b23fae66cf535719a9ec797e390208b2003e3cfc894b7624ada2f6894515f8836a4-66303337623538322d34386"

        # Initialize the SDK client instance by providing the base URL
        client = SdClient(Configuration("https://sdeuc1.eu-central-1.shapediver.com"))

        # Initialize a new session using the ticket.
        res = SessionApi(client).create_session_by_ticket(ticket)
        print(res)


Usage - Ticket and JWT
======================

It is possible to configure your ShapeDiver models such that JWT tokens are required to communicate
with them, which provides a strong authorisation mechanism.
In this case you will need to use the `ShapeDiver Platform API
<https://app.shapediver.com/api/documentation>`_ to obtain a JWT token for your model on demand.::

    from shapediver.geometry_api_v2 import SdClient, Configuration, SessionApi

    def init_session():
        # Please see above on how to obtain a ticket and a JWT
        jwt = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikp1c3QgYSB0ZXN0IiwiaWF0IjoxNjE4OTExMjcxLCJleHAiOjE2MTg5MTQ4OTcsImp0aSI6IjYzMjA3ODE3LWJiNWQtNDY3Zi04NzRkLWM4N2EyYzAxYmZlZCJ9.S5Ps_Fx5p6aJxdBOJMBKgpf2SIlp--6kkIZU55tiqEg"
        ticket = "8b23fae66cf535719a9ec797e390208b2003e3cfc894b7624ada2f6894515f8836a4-66303337623538322d34386"

        # Initialize the SDK client instance by providing the base URL
        client = SdClient(
            Configuration("https://sdeuc1.eu-central-1.shapediver.com", access_token=jwt)
        )

        # Initialize a new session using the ticket.
        res = SessionApi(client).create_session_by_ticket(ticket)
        print(res)


Examples
========

Examples on how to interact with available endpoints are given in the `tests
<https://github.com/shapediver/GeometryBackendSdkPython/tree/main/tests>`_ folder.

Versioning
==========

We take care to provide backwards compatibility for all older versions. However, new features might
be limited to newer API versions. Therefore, we recommend always using the newest API version out
there.

Support
=======

If you have questions, please use the `ShapeDiver Help Center <https://help.shapediver.com/>`_.

You can find out more about ShapeDiver `right here <https://www.shapediver.com/>`_.


Licensing
=========

This project is released under the `MIT License
<https://github.com/shapediver/GeometryBackendSdkPython/blob/main/LICENSE>`_.

            

Raw data

            {
    "_id": null,
    "home_page": "https://shapediver.com/",
    "name": "geometry-api-v2",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "shapediver, gb-api, sdk",
    "author": "ShapeDiver",
    "author_email": "dev@shapediver.com",
    "download_url": "https://files.pythonhosted.org/packages/e3/f9/4e67d376d820bd4ddaa717874f2f1154f9ec91700a52ecb0b8b77e3cea07/geometry_api_v2-1.7.0.tar.gz",
    "platform": "any",
    "description": ".. These are examples of badges you might want to add to your README:\n   please update the URLs accordingly\n\n    .. image:: https://api.cirrus-ci.com/github/<USER>/geometry_api_v2.svg?branch=main\n        :alt: Built Status\n        :target: https://cirrus-ci.com/github/<USER>/geometry_api_v2\n    .. image:: https://readthedocs.org/projects/geometry_api_v2/badge/?version=latest\n        :alt: ReadTheDocs\n        :target: https://geometry_api_v2.readthedocs.io/en/stable/\n    .. image:: https://img.shields.io/coveralls/github/<USER>/geometry_api_v2/main.svg\n        :alt: Coveralls\n        :target: https://coveralls.io/r/<USER>/geometry_api_v2\n    .. image:: https://img.shields.io/pypi/v/geometry_api_v2.svg\n        :alt: PyPI-Server\n        :target: https://pypi.org/project/geometry_api_v2/\n    .. image:: https://img.shields.io/conda/vn/conda-forge/geometry_api_v2.svg\n        :alt: Conda-Forge\n        :target: https://anaconda.org/conda-forge/geometry_api_v2\n    .. image:: https://pepy.tech/badge/geometry_api_v2/month\n        :alt: Monthly Downloads\n        :target: https://pepy.tech/project/geometry_api_v2\n    .. image:: https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter\n        :alt: Twitter\n        :target: https://twitter.com/geometry_api_v2\n\n.. image:: https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold\n    :alt: Project generated with PyScaffold\n    :target: https://pyscaffold.org/\n\n|\n\n===============\ngeometry_api_v2\n===============\n\n\n    SDK to communicate with the ShapeDiver Geometry API version 2\n\n\n`ShapeDiver <https://www.shapediver.com/>`_ is a cloud platform for building online applications\nbased on parametric 3D files made with `Rhinoceros 3D <https://www.rhino3d.com/>`_ and `Grasshopper\n<https://www.grasshopper3d.com/>`_.\n\nUsing the **ShapeDiver Geometry Backend API** allows access to ShapeDiver models without using the\n**ShapeDiver Viewer**. This SDK provides functionality to communicate with the Geometry Backend API\n**version 2**, and includes type hints describing request and response data objects. See the\n`API documentation <https://sdeuc1.eu-central-1.shapediver.com/api/v2/docs/>`_ for more details.\n\n\nAuthentication\n==============\n\nThe authentication system for the Geometry Backend API is based on **ticket objects** and **JWT\ntokens**, which are handled by the `ShapeDiver Platform <https://www.shapediver.com/app/>`_. You can\nobtain **tickets** and **JWT tokens** by:\n\n- using your account on the `ShapeDiver Platform <https://www.shapediver.com/app/>`_ (tickets only),\n  or\n\n- you can obtain them programmatically using the `ShapeDiver Platform API\n  <https://app.shapediver.com/api/documentation>`_ (both tickets and JWT tokens).\n\nAn SDK for the `ShapeDiver Platform API <https://app.shapediver.com/api/documentation>`_ will be\nreleased soon.\n\nWhen obtaining a ticket for your model from the ShapeDiver Platform, please be aware that you will\nneed a *ticket for backend access*, since you are accessing the Geometry Backend API from an\narbitrary client application that is not a web browser. For more details see the `ShapeDiver\nHelp Center developer settings <https://help.shapediver.com/doc/developers-settings>`_\n\n\nBase URL\n========\n\nThe base URL to use depends on which ShapeDiver Geometry Backend System your model was uploaded to.\nYou can find the base URL in your model's dashboard on the ShapeDiver Platform, it is also called\nthe *model view url*.\n\n\nUsage - Ticket only\n===================\n::\n\n    from shapediver.geometry_api_v2 import SdClient, Configuration, SessionApi\n\n    def init_session():\n        # Please see above on how to obtain a ticket\n        ticket = \"8b23fae66cf535719a9ec797e390208b2003e3cfc894b7624ada2f6894515f8836a4-66303337623538322d34386\"\n\n        # Initialize the SDK client instance by providing the base URL\n        client = SdClient(Configuration(\"https://sdeuc1.eu-central-1.shapediver.com\"))\n\n        # Initialize a new session using the ticket.\n        res = SessionApi(client).create_session_by_ticket(ticket)\n        print(res)\n\n\nUsage - Ticket and JWT\n======================\n\nIt is possible to configure your ShapeDiver models such that JWT tokens are required to communicate\nwith them, which provides a strong authorisation mechanism.\nIn this case you will need to use the `ShapeDiver Platform API\n<https://app.shapediver.com/api/documentation>`_ to obtain a JWT token for your model on demand.::\n\n    from shapediver.geometry_api_v2 import SdClient, Configuration, SessionApi\n\n    def init_session():\n        # Please see above on how to obtain a ticket and a JWT\n        jwt = \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikp1c3QgYSB0ZXN0IiwiaWF0IjoxNjE4OTExMjcxLCJleHAiOjE2MTg5MTQ4OTcsImp0aSI6IjYzMjA3ODE3LWJiNWQtNDY3Zi04NzRkLWM4N2EyYzAxYmZlZCJ9.S5Ps_Fx5p6aJxdBOJMBKgpf2SIlp--6kkIZU55tiqEg\"\n        ticket = \"8b23fae66cf535719a9ec797e390208b2003e3cfc894b7624ada2f6894515f8836a4-66303337623538322d34386\"\n\n        # Initialize the SDK client instance by providing the base URL\n        client = SdClient(\n            Configuration(\"https://sdeuc1.eu-central-1.shapediver.com\", access_token=jwt)\n        )\n\n        # Initialize a new session using the ticket.\n        res = SessionApi(client).create_session_by_ticket(ticket)\n        print(res)\n\n\nExamples\n========\n\nExamples on how to interact with available endpoints are given in the `tests\n<https://github.com/shapediver/GeometryBackendSdkPython/tree/main/tests>`_ folder.\n\nVersioning\n==========\n\nWe take care to provide backwards compatibility for all older versions. However, new features might\nbe limited to newer API versions. Therefore, we recommend always using the newest API version out\nthere.\n\nSupport\n=======\n\nIf you have questions, please use the `ShapeDiver Help Center <https://help.shapediver.com/>`_.\n\nYou can find out more about ShapeDiver `right here <https://www.shapediver.com/>`_.\n\n\nLicensing\n=========\n\nThis project is released under the `MIT License\n<https://github.com/shapediver/GeometryBackendSdkPython/blob/main/LICENSE>`_.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "SDK to communicate with the ShapeDiver Geometry API version 2",
    "version": "1.7.0",
    "project_urls": {
        "Documentation": "https://help.shapediver.com/doc/geometry-backend",
        "Homepage": "https://shapediver.com/",
        "Source": "https://github.com/shapediver/GeometryBackendSdkPython"
    },
    "split_keywords": [
        "shapediver",
        " gb-api",
        " sdk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea564635a08397d9f699e4d2849c9c5ba5425844e34b421b547d06a78c34d967",
                "md5": "4b2688261c9d1093e85cb56eea1323c3",
                "sha256": "7fdbc05138aab42ba9cd671ecd97ad3c69b1047a8a1e92b3af5d3e75959d2497"
            },
            "downloads": -1,
            "filename": "geometry_api_v2-1.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b2688261c9d1093e85cb56eea1323c3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 495383,
            "upload_time": "2024-12-18T08:57:09",
            "upload_time_iso_8601": "2024-12-18T08:57:09.659490Z",
            "url": "https://files.pythonhosted.org/packages/ea/56/4635a08397d9f699e4d2849c9c5ba5425844e34b421b547d06a78c34d967/geometry_api_v2-1.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3f94e67d376d820bd4ddaa717874f2f1154f9ec91700a52ecb0b8b77e3cea07",
                "md5": "b917f4ac398fc0dea8c857f4736d9fd6",
                "sha256": "8a070ca9abfc292bdece9f85685af020c81454f2c0e18064fe871a4de7204fe4"
            },
            "downloads": -1,
            "filename": "geometry_api_v2-1.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b917f4ac398fc0dea8c857f4736d9fd6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 284948,
            "upload_time": "2024-12-18T08:57:12",
            "upload_time_iso_8601": "2024-12-18T08:57:12.257220Z",
            "url": "https://files.pythonhosted.org/packages/e3/f9/4e67d376d820bd4ddaa717874f2f1154f9ec91700a52ecb0b8b77e3cea07/geometry_api_v2-1.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-18 08:57:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "shapediver",
    "github_project": "GeometryBackendSdkPython",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "requirements": [
        {
            "name": "urllib3",
            "specs": [
                [
                    ">=",
                    "1.25.3"
                ],
                [
                    "<",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "python_dateutil",
            "specs": [
                [
                    ">=",
                    "2.8.2"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "2"
                ]
            ]
        },
        {
            "name": "typing-extensions",
            "specs": [
                [
                    ">=",
                    "4.7.1"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "geometry-api-v2"
}
        
Elapsed time: 2.29035s