gwspy


Namegwspy JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryGPlates Web Service Python client/proxy
upload_time2024-07-22 02:59:28
maintainerNone
docs_urlNone
authorNone
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/gwspy.svg)](https://badge.fury.io/py/gwspy)

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

### Installation

`pip install gwspy`

### How to use

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

```python
  # pip install gwspy shapely
  import shapely
  from gwspy 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/gwspy/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](https://github.com/michaelchin/gplates-python-proxy/blob/main/examples/reconstruct_shapely_points.py)

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

![reconstruct_shapely_points](https://raw.githubusercontent.com/michaelchin/gplates-python-proxy/main//examples/output/reconstruct_shapely_points.png)

👉 [plot_subduction_zones.py](https://github.com/michaelchin/gplates-python-proxy/blob/main/examples/plot_subduction_zones.py)

![plot_subduction_zones](https://raw.githubusercontent.com/michaelchin/gplates-python-proxy/main/examples/output/plot_subduction_zones.png)

👉 [plot_topological_plate_polygons.py](https://github.com/michaelchin/gplates-python-proxy/blob/main/examples/plot_topological_plate_polygons.py)

![plot_topological_plate_polygons](https://raw.githubusercontent.com/michaelchin/gplates-python-proxy/main/examples/output/plot_topological_plate_polygons.png)

[All Examples](https://github.com/michaelchin/gplates-python-proxy/blob/main/examples/readme.md)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gwspy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "GPlates, RESTful, Web Service, Plate Tectonics",
    "author": null,
    "author_email": "Michael Chin <michael.chin@sydney.edu.au>",
    "download_url": "https://files.pythonhosted.org/packages/eb/61/5836e37697f144cc0fea6a544922c24486998d3b533c5fd980c3ee4777a8/gwspy-0.1.2.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/gwspy.svg)](https://badge.fury.io/py/gwspy)\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 gwspy`\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 gwspy shapely\n  import shapely\n  from gwspy 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/gwspy/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](https://github.com/michaelchin/gplates-python-proxy/blob/main/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](https://raw.githubusercontent.com/michaelchin/gplates-python-proxy/main//examples/output/reconstruct_shapely_points.png)\n\n\ud83d\udc49 [plot_subduction_zones.py](https://github.com/michaelchin/gplates-python-proxy/blob/main/examples/plot_subduction_zones.py)\n\n![plot_subduction_zones](https://raw.githubusercontent.com/michaelchin/gplates-python-proxy/main/examples/output/plot_subduction_zones.png)\n\n\ud83d\udc49 [plot_topological_plate_polygons.py](https://github.com/michaelchin/gplates-python-proxy/blob/main/examples/plot_topological_plate_polygons.py)\n\n![plot_topological_plate_polygons](https://raw.githubusercontent.com/michaelchin/gplates-python-proxy/main/examples/output/plot_topological_plate_polygons.png)\n\n[All Examples](https://github.com/michaelchin/gplates-python-proxy/blob/main/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.2",
    "project_urls": {
        "Homepage": "https://github.com/michaelchin/gplates-python-proxy"
    },
    "split_keywords": [
        "gplates",
        " restful",
        " web service",
        " plate tectonics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dfdc7a343e530a79745fcff42fedcc13e1036e8de084d2733555a7dc28443913",
                "md5": "6927a6e85cdf1bbb5a84b0f4f1f12b6b",
                "sha256": "e5fcd2ebd946628a98b2d7ba2556b5f7078770c8cacfec5e95f95baaf1153079"
            },
            "downloads": -1,
            "filename": "gwspy-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6927a6e85cdf1bbb5a84b0f4f1f12b6b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 461521,
            "upload_time": "2024-07-22T02:59:24",
            "upload_time_iso_8601": "2024-07-22T02:59:24.564210Z",
            "url": "https://files.pythonhosted.org/packages/df/dc/7a343e530a79745fcff42fedcc13e1036e8de084d2733555a7dc28443913/gwspy-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eb615836e37697f144cc0fea6a544922c24486998d3b533c5fd980c3ee4777a8",
                "md5": "d0aa032477bc4a0e9dc2c069b8466221",
                "sha256": "fcc424ccf2552fde85220053c5fd44b0bb07efb2f1b23e9eb37045c29a15b401"
            },
            "downloads": -1,
            "filename": "gwspy-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d0aa032477bc4a0e9dc2c069b8466221",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 455283,
            "upload_time": "2024-07-22T02:59:28",
            "upload_time_iso_8601": "2024-07-22T02:59:28.379354Z",
            "url": "https://files.pythonhosted.org/packages/eb/61/5836e37697f144cc0fea6a544922c24486998d3b533c5fd980c3ee4777a8/gwspy-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-22 02:59:28",
    "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": "gwspy"
}
        
Elapsed time: 5.00953s