Skip to main content

Main Python package to access the 3DTrees backend from tool containers

Project description

tool-interface

Main Python package to access the 3DTrees backend from tool containers. This package provides a unified interface for interacting with various backend services (Supabase, S3) used in the 3DTrees project.

Installation

From PyPI (recommended):

pip install tool-interface

From GitHub (development version):

pip install git+https://github.com/3dtrees-earth/tool-interface.git

Configuration

The package uses environment variables for configuration. All variables should be prefixed with THREEDTREES_. You can also use a .env file.

Required environment variables:

# Supabase
THREEDTREES_SUPABASE_URL=your_supabase_url
THREEDTREES_SUPABASE_KEY=your_supabase_key

# Storage (S3 compatible)
THREEDTREES_STORAGE_ACCESS_KEY=your_access_key
THREEDTREES_STORAGE_SECRET_KEY=your_secret_key
THREEDTREES_STORAGE_BUCKET_NAME=your_bucket_name

# Optional
THREEDTREES_STORAGE_ENDPOINT_URL=custom_s3_endpoint  # For non-AWS S3
THREEDTREES_STORAGE_REGION=eu-central-1  # Default: eu-central-1

Development

To set up the development environment:

  1. Clone the repository:

    git clone https://github.com/3dtrees-earth/tool-interface.git
    cd tool-interface
    
  2. Install development dependencies:

    pip install -e ".[dev]"
    
  3. Install pre-commit hooks:

    pre-commit install
    

Code Quality

The project uses several tools to ensure code quality:

  • mypy for static type checking
  • ruff for linting and formatting
  • pytest for testing

Run the checks locally:

pre-commit run --all-files  # Runs all checks
pytest                      # Runs tests

Versioning

The package uses semantic versioning through git tags. Version numbers are automatically derived from git tags when building the package.

To create a new release:

  1. Ensure all changes are committed
  2. Create and push a new version tag:
    git tag -a v0.1.0 -m "Release version 0.1.0"
    git push origin v0.1.0
    
  3. The GitHub Actions workflow will automatically build and publish to PyPI

License

See LICENSE file.

Project details


Download files

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

Source Distribution

tool_interface-0.1.2.tar.gz (138.7 kB view details)

Uploaded Source

Built Distribution

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

tool_interface-0.1.2-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

Details for the file tool_interface-0.1.2.tar.gz.

File metadata

  • Download URL: tool_interface-0.1.2.tar.gz
  • Upload date:
  • Size: 138.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tool_interface-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b577110fb7c60dbe778f0c4de79a375d532c5e17bf4626cd27773161e49ede70
MD5 e5d8628aba60c14ee5ccce01cce1349b
BLAKE2b-256 515eee7a3f87ebd15a540ea91bfec635c79e8c54d282e809ae6bba8669140d9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tool_interface-0.1.2.tar.gz:

Publisher: publish.yml on 3dTrees-earth/tool-interface

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tool_interface-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tool_interface-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tool_interface-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cf963a6945ac2b0fb2cb0d4bd30d05b9628af66750e80e73f7347ea6ce6a8a28
MD5 fc5b748ecad7577a76f769bfea459208
BLAKE2b-256 374f545ed228bcb3a5e322d0f6629b5a1519791ebab8bdea89f64f9e1d341457

See more details on using hashes here.

Provenance

The following attestation bundles were made for tool_interface-0.1.2-py3-none-any.whl:

Publisher: publish.yml on 3dTrees-earth/tool-interface

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page