MapLarge REST API Python Client
Project description
MapLarge REST API Python Client
MapLarge is a platform for analysing and visualizing geospatial data. The maplargerest Python library enables Python applications to communicate with MapLarge servers via their Rest API.
Supported Python Versions
The MapLarge REST API Python Client is supported on the latest patch version of Python 3.9 through 3.13, the versions officially supported by the Python Software Foundation. See https://devguide.python.org/versions/ for more information.
Usage Example
from maplargerest.endpoints import RestClient, items
client = RestClient(
url="https://my.maplarge.com",
username="user@example.com",
password="password")
tables = items(client.tables.list(account="test"))
Development Environment Creation
To test changes to the maplargerest Python library itself, follow the steps below to set up your development environment.
1. Create Virtual Environment
Create a Python environment for building and testing this project.
Windows PowerShell
python -m venv .venv
.venv\Scripts\activate.ps1
Windows Command Line
python -m venv .venv
.venv\Scripts\activate.bat
Linux or Mac
python3 -m venv .venv
source .venv/bin/activate
2. Install Dependencies
Install the python packages needed for the subsequent steps.
pip install -r requirements.txt
3. Lint
Check the Python code for errors.
mypy maplargerest test
pylint maplargerest test
4. Test
Set up configuration by creating a test settings file with the MapLarge login information Navigate to \generated\python\test Copy and paste testconfig.example.json and rename it to testconfig.json. Edit the URL, username, and password located in the testconfig.json file. Launch the server
Execute the Python code against a running MapLarge server to verify its behavior.
python -m unittest
HINT: (if you run into certificate errors consider using http). The servers port is located in MapLarge.Server.NetCore > Properties > launchsettigns.json
5. Generate Documentation
pushd docs
make html
popd
The resulting documentation will be in docs/_build/html/.
6. Generate Install Package
python -m build
The resulting binary distribution (.whl) and source distribution (.tar.gz) files will be in the dist/ folder.
Refresh requirements.txt
Periodically it may be beneficial to completely refresh the requirements.txt file with the latest version of dependencies and remove sub-dependencies that are no longer referenced by those new versions.
- Create and activate a brand new venv (see above) for the desired Python version.
- Execute:
pip install mypy pylint python-dateutil sphinx pillow types-python-dateutil build pip freeze > requirements.txt
Do this once for each supported version of Python - with a different output filename each time. Compare these requirements.txt files, and combine them into a single requirements.txt file using environment markers to indicate which dependencies should be installed for which versions of Python.
Common Errors
PS C:\code\maplarge-api-server-git\MapLarge.Build.RestApi\generated\python> python -m pylint maplargerest test
************* Module maplargerest.endpoints
maplargerest\endpoints.py:21:0: E0401: Unable to import 'dateutil.parser' (import-error)
This error could be the result of not enabling your virtual environment (see step 1 "Create Virtual Environment") or from not installing dependencies (see step 2 "Install Dependencies"). Revisit these steps and try again.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maplargerest-4.110.dev20250730181403.tar.gz.
File metadata
- Download URL: maplargerest-4.110.dev20250730181403.tar.gz
- Upload date:
- Size: 229.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a86583da58d4f4959c1cf9407c8337b92a8141ff6163a03c1566446a7fa4a42
|
|
| MD5 |
362a1c64c73fd2cdfe80f0067abbc47e
|
|
| BLAKE2b-256 |
547a43410cbeaa090f94db1eed631a0f9198c1cdb5ba4937f17ff56fca5a533f
|
File details
Details for the file maplargerest-4.110.dev20250730181403-py3-none-any.whl.
File metadata
- Download URL: maplargerest-4.110.dev20250730181403-py3-none-any.whl
- Upload date:
- Size: 221.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1b550eb3133f2245bcf4ec8276fb2213be37f5d47b6e11280046200d5c2149b
|
|
| MD5 |
28253e42998ad28de27a65fcb4d75380
|
|
| BLAKE2b-256 |
b0a226f696f7726b8144942039f04eaf10ae6bc408d0855295b8fc55e0f7a52f
|