{"id":21499188,"url":"https://github.com/osmlab/maproulette-python-client","last_synced_at":"2025-08-20T03:31:58.858Z","repository":{"id":38298794,"uuid":"228528242","full_name":"osmlab/maproulette-python-client","owner":"osmlab","description":"MapRoulette Client Library for Python","archived":false,"fork":false,"pushed_at":"2024-06-20T18:01:12.000Z","size":235,"stargazers_count":11,"open_issues_count":6,"forks_count":12,"subscribers_count":35,"default_branch":"dev","last_synced_at":"2024-12-07T03:21:18.332Z","etag":null,"topics":["mapping-tools","maproulette","openstreetmap","osm"],"latest_commit_sha":null,"homepage":"https://maproulette-python-client.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osmlab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-12-17T03:51:29.000Z","updated_at":"2024-06-20T17:59:59.000Z","dependencies_parsed_at":"2023-10-11T11:38:14.582Z","dependency_job_id":"678f8984-b0b0-4802-9c59-ff84e7fe61ff","html_url":"https://github.com/osmlab/maproulette-python-client","commit_stats":{"total_commits":152,"total_committers":13,"mean_commits":"11.692307692307692","dds":0.5328947368421053,"last_synced_commit":"1740b54a112021889e42f727de8f43fbc7860fd9"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmlab%2Fmaproulette-python-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmlab%2Fmaproulette-python-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmlab%2Fmaproulette-python-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmlab%2Fmaproulette-python-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osmlab","download_url":"https://codeload.github.com/osmlab/maproulette-python-client/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230388131,"owners_count":18217755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mapping-tools","maproulette","openstreetmap","osm"],"created_at":"2024-11-23T17:10:03.452Z","updated_at":"2024-12-19T06:10:18.993Z","avatar_url":"https://github.com/osmlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MapRoulette - A Python Client for the MapRoulette API\n\n\nhttps://maproulette-python-client.readthedocs.io\n\n[![PyPI version](https://badge.fury.io/py/maproulette.svg)](https://badge.fury.io/py/maproulette)\n[![Build Status](https://travis-ci.com/osmlab/maproulette-python-client.svg?branch=master)](https://travis-ci.com/osmlab/maproulette-python-client)\n\nThis client makes it easy for users to communicate with the MapRoulette API from within\ntheir Python environment. In the example below, we are able to access a MapRoulette project in just four lines of code:\n\n```\n   \u003e\u003e\u003e import maproulette\n   \u003e\u003e\u003e config = maproulette.Configuration()\n   \u003e\u003e\u003e api = maproulette.Project(config)\n   \u003e\u003e\u003e api.get_project_by_id(4719)\n   {'data': {'id': 4719, 'owner': 4785024, 'name': 'health_facilities_in_india',...}\n```\n\nThe full documentation for this package can be found [here](https://maproulette-python-client.readthedocs.io/). \n\n\n## Getting Started\n\nInstall the package (or add it to your requirements.txt file):\n\n```bash\npip install maproulette\n```\n\nImport the package:\n\n```\nimport maproulette\n```\n\nimport `json` for nice json printing:\n\n```\nimport json\n```\n\nFrom there, create a configuration object. Depending on your use case, you may need to pass your API key. Specify\nthat when you create your configuration. For example:\n\n```\nconfig = maproulette.Configuration(api_key='{YOUR_API_KEY}')\n```\n\nYour API key is listed at the bottom of https://maproulette.org/user/profile page.\n\nOnce you have your configuration object we can create an API object using one of several modules depending on the\nfunctionality that the user is looking for. For example, creating a Project object allows the user to interact with all\nof the project-related functionality in the MapRoulette package.\n\n```\napi = maproulette.Project(config)\n```\n\nNow we have access to the MapRoulette Project API methods. In the example below, I want to find a project by name using\na search string:\n\n```\n# We want to fetch a project with name 'Health Facilities in India'\nmy_project_name = 'Health Facilities in India'\n\n# Pretty-print the API response\nprint(json.dumps(api.find_project(my_project_name), indent=4, sort_keys=True))\n```\n\nThis returns a nicely printed JSON object representing the project named 'Health Facilities in India':\n\n```\n{\n    \"data\": [\n        {\n            \"created\": \"2019-08-26T06:34:28.655Z\",\n            \"deleted\": false,\n            \"description\": \"Adding the Hospitals \",\n            \"displayName\": \"Health Facilities in India\",\n            \"enabled\": true,\n            \"featured\": false,\n            \"groups\": [\n                {\n                    \"created\": \"2020-03-25T16:23:04.360Z\",\n                    \"groupType\": 1,\n                    \"id\": 9273,\n                    \"modified\": \"2020-03-25T16:23:04.360Z\",\n                    \"name\": \"4719_Admin\",\n                    \"projectId\": 4719\n                },\n                {\n                    \"created\": \"2020-03-25T16:23:04.360Z\",\n                    \"groupType\": 2,\n                    \"id\": 9274,\n                    \"modified\": \"2020-03-25T16:23:04.360Z\",\n                    \"name\": \"4719_Write\",\n                    \"projectId\": 4719\n                },\n                {\n                    \"created\": \"2020-03-25T16:23:04.360Z\",\n                    \"groupType\": 3,\n                    \"id\": 9275,\n                    \"modified\": \"2020-03-25T16:23:04.360Z\",\n                    \"name\": \"4719_Read\",\n                    \"projectId\": 4719\n                }\n            ],\n            \"id\": 4719,\n            \"isVirtual\": false,\n            \"modified\": \"2020-01-30T11:05:44.466Z\",\n            \"name\": \"health_facilities_in_india\",\n            \"owner\": 4785024\n        }\n    ],\n    \"status\": 200\n}\n```\n## Development\n\n### Contributing\n\nOpen an issue! Thanks for contributing!\n\n### Testing\n\nThis package uses [Tox](https://tox.readthedocs.io/en/latest/) to perform testing. In order to run Tox, execute the\n`tox` command from the root directory. \n\n\n### Building the Documentation\n\nThe documentation for this package is built with [Sphinx](https://www.sphinx-doc.org/en/master/index.html). In order to\nbuild the documentation for this package: \n\n```\n$ cd docs\n``` \nand then: \n```\n$ make html\n```\nThat command will generate the HTML documentation files for the project. We've hosted these docs at\n[Read the Docs](https://readthedocs.org/). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosmlab%2Fmaproulette-python-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosmlab%2Fmaproulette-python-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosmlab%2Fmaproulette-python-client/lists"}