Skip to main content

Web service that runs outside of VOLTTRON server and let VOLTTRON instance to register itself and lookup for services that can be part of a federated group

Project description

Platform Lookup Service

A FastAPI-based microservice for managing platform registrations and lookups. This service provides a RESTful API for registering and managing platforms with their associated credentials and network addresses.

Features

  • Platform registration and management
  • Thread-safe operations for concurrent access
  • Input validation using Pydantic models
  • Support for platform grouping
  • JSON-based persistent storage
  • RESTful API with OpenAPI documentation

Requirements

  • Python 3.x
  • FastAPI
  • Uvicorn

Installation

  1. From pypi

    pip install volttron-platform-lookup
    
  2. From source code:

    git clone [repository-url]
    cd platform-lookup
    poetry install
    

Usage

  1. Start the server:

    volttron-platform-lookup <optional port. defaults to 8000>
    
  2. The API will be available at http://localhost:8000

  3. Access the API documentation at http://localhost:8000/docs

API Endpoints

The service provides RESTful endpoints for platform management. All data is exchanged in JSON format.

Platform Model

Each platform registration includes:

  • id: Unique identifier for the platform (alphanumeric, underscores, and hyphens allowed)
  • address: Network address where the platform can be reached (IP, domain, or URI)
  • public_credentials: Authentication credential (minimum 16 characters)
  • group: Optional grouping parameter (defaults to "default")

Example platform registration:

{
    "id": "platform-123",
    "address": "tcp://example.com",
    "public_credentials": "abcdef1234567890",
    "group": "production"
}

Data Storage

Platform data is stored in platforms.json with thread-safe access mechanisms to prevent race conditions during concurrent operations.

Security

  • Input validation for all API endpoints
  • Credential length requirements
  • Address format validation
  • Thread-safe operations

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.

Copyright 2025 Battelle Memorial Institute

Disclaimer Notice

This material was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the United States Department of Energy, nor Battelle, nor any of their employees, nor any jurisdiction or organization that has cooperated in the development of these materials, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness or any information, apparatus, product, software, or process disclosed, or represents that its use would not infringe privately owned rights.

Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof, or Battelle Memorial Institute. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof.

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

volttron_platform_lookup-0.1.0rc0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

volttron_platform_lookup-0.1.0rc0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file volttron_platform_lookup-0.1.0rc0.tar.gz.

File metadata

  • Download URL: volttron_platform_lookup-0.1.0rc0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.10.18 Linux/6.8.0-1031-azure

File hashes

Hashes for volttron_platform_lookup-0.1.0rc0.tar.gz
Algorithm Hash digest
SHA256 7d4100f8371ab0fa3fe16d2c804e95d929bd78e2c214f9a04c1868080828dc04
MD5 de8fe7f0216a1fadc825e165577b5153
BLAKE2b-256 83fe1ded6cb5f7d3e77adae24f4ab60141f3f59eebaabb1d36872120f2e44bd4

See more details on using hashes here.

File details

Details for the file volttron_platform_lookup-0.1.0rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for volttron_platform_lookup-0.1.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 40a94a5ce310281e191ea9299f413c6bd2b6bbbd0f2c82339153213143551476
MD5 0d9df7577412e4d29cf20f793174a985
BLAKE2b-256 0012ad59aaebeab9624c92f30a0c57154ef8eab06eab9ecebc44f9a3c34f106c

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