Skip to main content

gRPC interface to lara_django_organisms_store

Project description

LARA Django Organisms Store - gRPC API

This package provides a gRPC interface to the LARA Django Organisms Store, enabling high-performance remote procedure calls for managing organism instances and related data.

Overview

The lara_django_organisms_store_grpc package offers a strongly-typed, efficient gRPC API for interacting with the LARA Django Organisms Store. It supports operations on:

  • OrganismInstances: Individual organism records with origin, location, and metadata
  • OrganismBaskets: Collections of organism instances
  • OrganismLocalStore: Local storage management for organisms
  • OrganismInstancesSubset: Filtered subsets of organism data
  • ExtraData: Additional metadata and extended information

Installation

Requirements

  • Python 3.13.*
  • gRPC runtime (grpcio>=1.73.0)

Install from source

cd api/grpc
pip install .

Development installation

For development with additional tools:

pip install -e ".[dev]"

This includes:

  • grpcio-tools - For protocol buffer compilation
  • pytest - Testing framework
  • pytest-cov - Coverage reporting
  • pytest-asyncio - Async testing support

Usage

Basic Client Example

import grpc
from lara_django_organisms_store_grpc import organism_service_pb2
from lara_django_organisms_store_grpc import organism_service_pb2_grpc

# Create a gRPC channel
channel = grpc.insecure_channel('localhost:50051')

# Create a stub (client)
stub = organism_service_pb2_grpc.OrganismServiceStub(channel)

# Make a request
response = stub.GetOrganism(
    organism_service_pb2.GetOrganismRequest(organism_id="123")
)

print(f"Organism: {response.name}")

Server Setup

The gRPC server is typically integrated with the Django application. Refer to the main LARA Django Organisms Store documentation for server configuration.

Development

Running Tests

pytest

Running Tests with Coverage

pytest --cov=lara_django_organisms_store_grpc

Regenerating Protocol Buffers

If you modify the .proto files, regenerate the Python code:

cd api
buf generate

API Documentation

For detailed API documentation, see:

Project Structure

api/grpc/
├── README.md                     # This file
├── pyproject.toml                # Package configuration
└── python/                       # Python module root
    └── lara_django_organisms_store_grpc/
        ├── __init__.py
        └── *_pb2.py              # Generated protocol buffer code

Links

License

See the LICENSE file in the project root for license information.

Contributing

Contributions are welcome! Please see the CONTRIBUTING.md file in the project root for guidelines.

Authors

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

lara_django_organisms_store_grpc-0.2.101.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file lara_django_organisms_store_grpc-0.2.101.tar.gz.

File metadata

File hashes

Hashes for lara_django_organisms_store_grpc-0.2.101.tar.gz
Algorithm Hash digest
SHA256 979a2f36f25650c9d43e70fd632727d3542024f9147807edad93b212e3ecc5ef
MD5 3469e41daa2bfe40a67763f8207ff155
BLAKE2b-256 c714bbaff0cb15789da76c0505f8d805c5cc6124ab8cf979d0cf1b773fa2e4c7

See more details on using hashes here.

File details

Details for the file lara_django_organisms_store_grpc-0.2.101-py3-none-any.whl.

File metadata

File hashes

Hashes for lara_django_organisms_store_grpc-0.2.101-py3-none-any.whl
Algorithm Hash digest
SHA256 1e102e58d7f314d49bf91aaddb587bfd79a26b1cc713ac35d1906293c1f9ca03
MD5 4e6d15d3a1e654f8cd09c84eca27e02d
BLAKE2b-256 f3a9a17b3e6402e7600b630d7e20f3c3aa9088ca7421a03c33c82b2a724ac3f7

See more details on using hashes here.

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