Skip to main content

field-manager-python-client

A client library for accessing Field Manager Data API

🚀 Quick Start

Installation

pip install field_manager_python_client python-keycloak

Authentication

The easiest way to get started is using the built-in authentication functions:

from field_manager_python_client import get_prod_client

# Authenticate with your Field Manager account
client = get_prod_client(email="your.email@example.com")

Basic Usage

from field_manager_python_client.api.projects import get_project_projects_project_id_get

# Use the authenticated client
project_info = get_project_projects_project_id_get.sync(client=client, project_id="your-project-id")
print(f"Project: {project_info.name}")

🔐 Authentication Options

1. Integrated Authentication (Recommended)

from field_manager_python_client import authenticate

client = authenticate(environment="prod", email="user@example.com")

2. Manual Token Setup

from field_manager_python_client import AuthenticatedClient

client = AuthenticatedClient(base_url="https://app.fieldmanager.io/api/location", token="your-access-token")

3. Service Account (for automation)

Use a dedicated Keycloak client created for your integration See the main repository for service account setup.

📖 API Usage Patterns

Synchronous Operations

from field_manager_python_client.api.organizations import get_organizations_organizations_get

# Simple request - returns data or None
organizations = get_organizations_organizations_get.sync(client=client)

# Detailed request - returns Response object with status code, headers, etc.
from field_manager_python_client.types import Response

response: Response = get_organizations_organizations_get.sync_detailed(client=client)
if response.status_code == 200:
    organizations = response.parsed

Asynchronous Operations

import asyncio
from field_manager_python_client.api.organizations import get_organizations_organizations_get


async def fetch_organizations():
    # Simple async request
    organizations = await get_organizations_organizations_get.asyncio(client=client)

    # Detailed async request
    response = await get_organizations_organizations_get.asyncio_detailed(client=client)
    return response.parsed


# Run async function
organizations = asyncio.run(fetch_organizations())

🛠️ Advanced Features

SSL Configuration

from field_manager_python_client import AuthenticatedClient

# Custom certificate bundle
client = AuthenticatedClient(
    base_url="https://internal.example.com/api", token="token", verify_ssl="/path/to/certificate_bundle.pem"
)

# Disable SSL verification (not recommended for production)
client = AuthenticatedClient(base_url="https://internal.example.com/api", token="token", verify_ssl=False)

Custom HTTP Configuration

from field_manager_python_client import AuthenticatedClient


def log_request(request):
    print(f"Request: {request.method} {request.url}")


def log_response(response):
    print(f"Response: {response.status_code}")


client = AuthenticatedClient(
    base_url="https://api.example.com",
    token="token",
    httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}},
)

📚 Learn More

For comprehensive documentation, examples, and contribution guidelines, visit the main repository: https://github.com/norwegian-geotechnical-institute/field-manager-python-client

The repository includes:

  • 📖 Complete authentication guide
  • 🔧 Advanced usage examples
  • 🚀 Real-world code samples
  • 🤝 Contributing guidelines
  • 📋 Issue tracking and support

🔍 API Reference

Every endpoint becomes a Python function with four variants:

  • sync: Blocking request returning parsed data or None
  • sync_detailed: Blocking request returning full Response object
  • asyncio: Async version of sync
  • asyncio_detailed: Async version of sync_detailed

All path/query parameters and request bodies become function arguments. Functions are organized by API tags in field_manager_python_client.api.* modules.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

field_manager_python_client-4.7.15.tar.gz (236.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

field_manager_python_client-4.7.15-py3-none-any.whl (770.9 kB view details)

Uploaded Python 3

File details

Details for the file field_manager_python_client-4.7.15.tar.gz.

File metadata

  • Download URL: field_manager_python_client-4.7.15.tar.gz
  • Upload date:
  • Size: 236.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.14 Linux/6.17.0-1022-azure

File hashes

Hashes for field_manager_python_client-4.7.15.tar.gz
Algorithm Hash digest
SHA256 63d323135c86dad7242e855ec697e566afbe8ec6d1b7c09e922fc92aae2d81c2
MD5 18666a1c5f15ddbbd54fc196d88a4992
BLAKE2b-256 d8d1dc7816d56b51bd5fcdf7d75da058e5129ec333e377389f943ef73db965d1

See more details on using hashes here.

File details

Details for the file field_manager_python_client-4.7.15-py3-none-any.whl.

File metadata

File hashes

Hashes for field_manager_python_client-4.7.15-py3-none-any.whl
Algorithm Hash digest
SHA256 64f0f73a5f20dba9dcb0d6db4c5450f4a8f5cc59ad2019d2964a6501ce88e98b
MD5 cb10e2dcf188fd5b1048ef8fe6a1c47b
BLAKE2b-256 453e9b9fea2da98bc60a0e2a9796afedf71b96b7a820e9fb2cbfc03e81feccf5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

4.7.15 This release

2 files

4.6.239

2 files

4.6.228

2 files

4.6.192

2 files

4.6.97

2 files

4.6.89

2 files

4.6.79

2 files

4.6.68

2 files

4.6.48

2 files

4.6.45

2 files

4.6.38

2 files

4.6.37

2 files

4.6.25.post4

2 files

4.6.25.post3

2 files

4.6.25.post1

2 files

4.6.25

2 files

4.6.20

2 files

4.6.16

2 files

4.6.11

2 files

4.6.7

2 files

4.6.1

2 files

4.5.94

2 files

4.5.89

2 files

4.5.82

2 files

4.5.60

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page