gplates-ws-proxy


Namegplates-ws-proxy JSON
Version 0.1.1 PyPI version JSON
download
home_page
SummaryGPlates Web Service Python client/proxy
upload_time2024-01-09 06:58:46
maintainer
docs_urlNone
author
requires_python>=3.9
licenseMIT License Copyright (c) 2023 michaelchin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords gplates restful web service plate tectonics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GPlates Web Service Python Client/Proxy

![build badge](https://github.com/michaelchin/gplates-python-proxy/actions/workflows/build-doc.yml/badge.svg)
[![PyPI version](https://badge.fury.io/py/gplates-ws-proxy.svg)](https://badge.fury.io/py/gplates-ws-proxy)

This Python package allows users to access [GPlates Web Service](https://gwsdoc.gplates.org/) more easily via simple Python programming interface.

### Installation

`pip install gplates-ws-proxy`

### How to use

The following Python code reconstructs three locations to 100Ma with Muller2019 reconstruction model.

```python
  # pip install gplates-ws-proxy shapely
  import shapely
  from gplates_ws_proxy import PlateModel, reconstruct_shapely_points

  lats = [50, 10, 50]
  lons = [-100, 160, 100]
  points = [shapely.Point(x, y) for x, y in zip(lons, lats)]

  model = PlateModel("Muller2019")
  paleo_points = reconstruct_shapely_points(model, points, 100)
  print(paleo_points)
```

### GPlates Web Service server

By default, https://gws.gplates.org is used. You can use .env file to specify your service URL. Alternertively, you can `export GWS_URL=https://your-service-url` in a terminal.

See [env.template](src/gplates_ws_proxy/env.template) and [setup GWS server with Docker](https://github.com/GPlates/gplates-web-service/tree/master/docker#-quick-start).

### Dependencies

- [requests](https://pypi.org/project/requests/)
- [shapely](https://pypi.org/project/shapely/)

### API reference

API reference can be found at https://michaelchin.github.io/gplates-python-proxy/.

### Examples

👉 [reconstruct_shapely_points.py](examples/reconstruct_shapely_points.py)

The red dots are present-day locations. The blue dots are paleo-locations at 100Ma.

![reconstruct_shapely_points](/examples/output/reconstruct_shapely_points.png)

👉 [plot_subduction_zones.py](examples/plot_subduction_zones.py)

![plot_subduction_zones](examples/output/plot_subduction_zones.png)

👉 [plot_topological_plate_polygons.py](examples/plot_topological_plate_polygons.py)

![plot_topological_plate_polygons](examples/output/plot_topological_plate_polygons.png)

[All Examples](examples/readme.md)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "gplates-ws-proxy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "GPlates,RESTful,Web Service,Plate Tectonics",
    "author": "",
    "author_email": "Michael Chin <michael.chin@sydney.edu.au>",
    "download_url": "https://files.pythonhosted.org/packages/35/2f/255534f9f8278c76b09ac521db7b985e5e87b3d994818964a4c97efc83a2/gplates-ws-proxy-0.1.1.tar.gz",
    "platform": null,
    "description": "# GPlates Web Service Python Client/Proxy\n\n![build badge](https://github.com/michaelchin/gplates-python-proxy/actions/workflows/build-doc.yml/badge.svg)\n[![PyPI version](https://badge.fury.io/py/gplates-ws-proxy.svg)](https://badge.fury.io/py/gplates-ws-proxy)\n\nThis Python package allows users to access [GPlates Web Service](https://gwsdoc.gplates.org/) more easily via simple Python programming interface.\n\n### Installation\n\n`pip install gplates-ws-proxy`\n\n### How to use\n\nThe following Python code reconstructs three locations to 100Ma with Muller2019 reconstruction model.\n\n```python\n  # pip install gplates-ws-proxy shapely\n  import shapely\n  from gplates_ws_proxy import PlateModel, reconstruct_shapely_points\n\n  lats = [50, 10, 50]\n  lons = [-100, 160, 100]\n  points = [shapely.Point(x, y) for x, y in zip(lons, lats)]\n\n  model = PlateModel(\"Muller2019\")\n  paleo_points = reconstruct_shapely_points(model, points, 100)\n  print(paleo_points)\n```\n\n### GPlates Web Service server\n\nBy default, https://gws.gplates.org is used. You can use .env file to specify your service URL. Alternertively, you can `export GWS_URL=https://your-service-url` in a terminal.\n\nSee [env.template](src/gplates_ws_proxy/env.template) and [setup GWS server with Docker](https://github.com/GPlates/gplates-web-service/tree/master/docker#-quick-start).\n\n### Dependencies\n\n- [requests](https://pypi.org/project/requests/)\n- [shapely](https://pypi.org/project/shapely/)\n\n### API reference\n\nAPI reference can be found at https://michaelchin.github.io/gplates-python-proxy/.\n\n### Examples\n\n\ud83d\udc49 [reconstruct_shapely_points.py](examples/reconstruct_shapely_points.py)\n\nThe red dots are present-day locations. The blue dots are paleo-locations at 100Ma.\n\n![reconstruct_shapely_points](/examples/output/reconstruct_shapely_points.png)\n\n\ud83d\udc49 [plot_subduction_zones.py](examples/plot_subduction_zones.py)\n\n![plot_subduction_zones](examples/output/plot_subduction_zones.png)\n\n\ud83d\udc49 [plot_topological_plate_polygons.py](examples/plot_topological_plate_polygons.py)\n\n![plot_topological_plate_polygons](examples/output/plot_topological_plate_polygons.png)\n\n[All Examples](examples/readme.md)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 michaelchin  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "GPlates Web Service Python client/proxy",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/michaelchin/gplates-python-proxy"
    },
    "split_keywords": [
        "gplates",
        "restful",
        "web service",
        "plate tectonics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fcce6dca1889ef235c104ebd5a80382ecaaa60ad67ad2476c9c17ac2ab968e7f",
                "md5": "a3dd59cf28ab18db9feb7c096b91cc6a",
                "sha256": "cead70457bec1cc385d7cfce91ff074ed2a1454ee4899e79e4e8e59f16862ac7"
            },
            "downloads": -1,
            "filename": "gplates_ws_proxy-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a3dd59cf28ab18db9feb7c096b91cc6a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 30365,
            "upload_time": "2024-01-09T06:58:44",
            "upload_time_iso_8601": "2024-01-09T06:58:44.679894Z",
            "url": "https://files.pythonhosted.org/packages/fc/ce/6dca1889ef235c104ebd5a80382ecaaa60ad67ad2476c9c17ac2ab968e7f/gplates_ws_proxy-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "352f255534f9f8278c76b09ac521db7b985e5e87b3d994818964a4c97efc83a2",
                "md5": "23b4afd3d64b00effb2d0a1ffdd3038a",
                "sha256": "735a81db55ce0373c64b5aa709f530743870c2c8e40e1e189c2771c22db231e3"
            },
            "downloads": -1,
            "filename": "gplates-ws-proxy-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "23b4afd3d64b00effb2d0a1ffdd3038a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 22700,
            "upload_time": "2024-01-09T06:58:46",
            "upload_time_iso_8601": "2024-01-09T06:58:46.404760Z",
            "url": "https://files.pythonhosted.org/packages/35/2f/255534f9f8278c76b09ac521db7b985e5e87b3d994818964a4c97efc83a2/gplates-ws-proxy-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-09 06:58:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "michaelchin",
    "github_project": "gplates-python-proxy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "gplates-ws-proxy"
}
        
Elapsed time: 0.16175s