A lightweight, Pythonic library for interacting with the Field Manager API — quickly retrieve project data, manage locations, and automate workflows, all from Python.
- Easy Integration: Each endpoint is ready to use—no manual HTTP calls needed.
- Seamless Authentication: Built-in OAuth2/OIDC authentication with automatic token management.
- Auto-Generated & Up-to-Date: Always in sync with the latest Field Manager API updates.
- Full Coverage: Access every endpoint and model the Field Manager platform provides.
-
Install the package with authentication support:
pip install field-manager-python-client python-keycloak
-
Authenticate: Use the built-in authentication functions for seamless access:
from field_manager_python_client import get_prod_client # Authenticate with your Field Manager account client = get_prod_client(email="[email protected]")
Here's how to fetch project information using the authenticated client:
from field_manager_python_client import get_prod_client
from field_manager_python_client.api.projects import get_project_projects_project_id_get
# Authenticate and get client
client = get_prod_client(email="[email protected]")
# Use the client to fetch project data
project_id = "your-project-id"
project_info = get_project_projects_project_id_get.sync(client=client, project_id=project_id)
print(f"Project Name: {project_info.name}")
The client supports multiple authentication methods:
-
Integrated Authentication (Recommended):
from field_manager_python_client import authenticate, get_prod_client client = authenticate(environment="prod", email="[email protected]") # or client = get_prod_client(email="[email protected]")
-
Manual Token Setup:
from field_manager_python_client import AuthenticatedClient client = AuthenticatedClient( base_url="https://app.fieldmanager.io/api/location", token="your-access-token" )
-
Service Account Authentication (for automated workflows):
- See the Authentication Guide for details
- Also covered in the Advanced User Guide
Check out the examples folder for scripts demonstrating how to:
- Authentication: Multiple ways to authenticate with the API
- Organizations: Fetch and manage organization data
- Projects: Retrieve project details and metadata
- Locations: Manage field locations and associated data
- Data Export: Export project data in various formats
- Advanced Usage: Async operations, bulk operations, and more
For comprehensive documentation, see the ./doc/
directory:
- Authentication Guide: Complete guide to all authentication methods
- Advanced User Guide: In-depth coverage of sync/async operations and customizations
- Troubleshooting Guide: Solutions for common issues, including Windows long path support
- Examples Overview: Detailed overview of all available examples
If you want to learn more about this library, contribute, or understand the internals, visit the main repository: https://github.com/norwegian-geotechnical-institute/field-manager-python-client
The actual client package is auto-generated from the Field Manager API specification and includes:
- Full type hints and IDE support
- Comprehensive error handling
- Both synchronous and asynchronous operations
- Advanced customization options
We welcome issues, bug reports, and feature requests! Please check our contributing guidelines and feel free to open an issue or submit a pull request.
Have fun building with the Field Manager Python Client! If you have questions or need help, feel free to open an issue. Happy coding! ✨