Skip to main content



Sinapsis ApertureDB

Modular templates for database entity management with ApertureDB

🐍 Installation • 🚀 Features • 📚 Usage example • 🌐 Webapp • 📙 Documentation • 🔍 License

Sinapsis ApertureDB provides a robust and flexible integration for the ApertureDB Python SDK. It enables users to execute complex database operations—such as entity management, status monitoring, and schema retrieval—through a modular, template-based system.

🐍 Installation

Install using your package manager of choice. We encourage the use of uv

Example with uv:

  uv pip install sinapsis-aperturedb --extra-index-url https://pypi.sinapsis.tech

or with raw pip:

  pip install sinapsis-aperturedb --extra-index-url https://pypi.sinapsis.tech

🚀 Features

Templates Supported

  • ApertureDBAddEntitiesFromCSV: Ingests tabular data from a pandas DataFrame stored within a DataContainer, mapping each row to a unique Entity for bulk insertion into the database.
  • ApertureDBFindEntities: Executes targeted entity queries within ApertureDB, retrieving records that match a specific set of user-defined constraints and filters.
  • ApertureDBGetStatus: Polls the ApertureDB server to retrieve real-time health metrics, connectivity status, and operational readiness.
  • ApertureDBGetSchema: Introspects the database to generate a comprehensive overview of the current data model, including entity types, properties, and relationships.

[!TIP] Use CLI command sinapsis info --all-template-names to show a list with all the available Template names installed with Sinapsis ApertureDB.

[!TIP] Use CLI command sinapsis info --example-template-config TEMPLATE_NAME to produce an example Agent config for the Template specified in TEMPLATE_NAME.

For example, for ApertureDBGetStatus use sinapsis info --example-template-config ApertureDBGetStatus to produce an example config like:

agent:
  name: my_test_agent
templates:
- template_name: InputTemplate
  class_name: InputTemplate
  attributes: {}
- template_name: ApertureDBGetStatus
  class_name: ApertureDBGetStatus
  template_input: InputTemplate
  attributes:
    connect_with_key: false
    connection_params:
      host: localhost
      user: ''
      port: 55555
      password: ''
      key: ''
      use_ssl: false

📚 Usage example

You can begin testing sinapsis-aperturedb by executing the ApertureDBGetStatus configuration. To utilize the ApertureDB templates, you must first establish a connection to an ApertureDB instance. You have three primary options:

  • Cloud: Connect to a hosted ApertureDB instance using a generated API key.
  • Local: Deploy a local instance using the aperturedb-community Docker image.
  • Docker Compose: Automatically deploy the aperturedb service and execute the getStatus configuration in one workflow.
☁️ ApertureDB Cloud
  1. Generate an API key: Create an ApertureDB Cloud account and generate your API key by following the official ApertureDB setup guide.

  2. Configure Environment Variables: Set the APERTUREDB_API_KEY variable in your terminal. This key is used by the connect_with_key attribute in your configuration.

    export APERTUREDB_API_KEY="your-api-key-here"
    
  3. Prepare the GetStatus Configuration: Save the following YAML as check_status.yaml. This configuration tells the agent to authenticate using your stored API key.

    agent:
      name: aperturedb_get_status
      description: Validates connection and retrieves ApertureDB server health status.
    
    templates:
    - template_name: InputTemplate
      class_name: InputTemplate
      attributes: {}
    
    - template_name: GetStatus
      class_name: ApertureDBGetStatus
      template_input: InputTemplate
      attributes:
        connect_with_key: true
    
  4. Execute via CLI: Run the configuration using the Sinapsis CLI:

    sinapsis run check_status.yaml
    
💻 Local ApertureDB instance

For local prototyping and testing of sinapsis-aperturedb, you can deploy a containerized instance of ApertureDB Community Edition.

  1. Deploy the container. Use the following Docker command to run the ApertureDB Community Edition. This setup maps the default port and configures initial credentials.

    docker run -p 55555:55555 -e ADB_MASTER_KEY=admin -e ADB_FORCE_SSL=false  aperturedata/aperturedb-community
    
  2. Configure Environment Variables: Set your connection parameters so sinapsis-aperturedb can authenticate with the local instance.

    export APERTUREDB_HOST="localhost"
    export APERTUREDB_PORT=55555
    
  3. Prepare the GetStatus Configuration: Use the following YAML configuration to verify the connection. Save this as check_status.yaml:

    agent:
      name: aperturedb_get_status
      description: Validates connection and retrieves ApertureDB server health status.
    
    templates:
    - template_name: InputTemplate
      class_name: InputTemplate
      attributes: {}
    
    - template_name: GetStatus
      class_name: ApertureDBGetStatus
      template_input: InputTemplate
      attributes:
        connect_with_key: false
        connection_params:
            host: localhost
            user: admin
            port: 55555
            password: admin
            use_ssl: false
    
  4. Execute via CLI: Run the configuration using the Sinapsis CLI:

    sinapsis run check_status.yaml
    
🐳 Docker Compose

IMPORTANT This docker image depends on the sinapsis:base image. Refer to the official Sinapsis Docker Instructions to build the base before proceeding.

  1. Build the sinapsis-aperturedb image: Compile the local environment using the provided compose file.

    docker compose -f docker/compose.yaml build
    
  2. Start the app container: Launch the service in the background or attached mode.

    docker compose -f docker/compose_app.yaml up -d
    
  3. Monitor logs and status: Verify the connection to ApertureDB by tailing the container logs.

    docker logs -f sinapsis-aperturedb-app
    
  4. To stop the app: Gracefully shut down the services and clean up network resources.

    docker compose -f docker/compose_app.yaml down
    

📙 Documentation

Documentation for this and other sinapsis packages is available on the sinapsis website

Tutorials for different projects within sinapsis are available at sinapsis tutorials page

🔍 License

This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the LICENSE file.

For commercial use, please refer to our official Sinapsis website for information on obtaining a commercial license.

Metadata

Release files for sinapsis-aperturedb 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sinapsis-aperturedb 0.1.0
File Size Uploaded
sinapsis_aperturedb-0.1.0.tar.gz 26.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sinapsis-aperturedb 0.1.0
File Interpreter ABI Platform
sinapsis_aperturedb-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 56.9 kB

Release files / sinapsis_aperturedb-0.1.0.tar.gz

Download URL sinapsis_aperturedb-0.1.0.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0f6b943a89e306705d504d7b450f20de9559dd40861c9124270a65f4d17681f2
BLAKE2b-256 checksum
How to use checksums
886ed9c10b7e38bbf4680a634b3b8d460bcb0ea8fedf90227216cc28b4eceaf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release files / sinapsis_aperturedb-0.1.0-py3-none-any.whl

Download URL sinapsis_aperturedb-0.1.0-py3-none-any.whl
Size 29.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1fda4e963ba0c680149872d963f7971c09d6f7243b43dae0e6d4f31968ef4df
BLAKE2b-256 checksum
How to use checksums
789c5414d727710a1e30c75720f63f1dc87ca8e83fed48be107e40670b4749e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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