Skip to main content

A custom Poetry command for IVCAP deployments

Project description

poetry-plugin-ivcap

A custom Poetry plugin that adds a poetry ivcap command for local and Docker-based deployments.

Example Configuration

Add to your pyproject.toml:

[tool.poetry-plugin-ivcap]
service-file = "service.py"
service-id = "urn:ivcap:service:ac158a1f-dfb4-5dac-bf2e-9bf15e0f2cc7"
port = 8077
# docker
# docker-run-opts = { port = 8079 }```

## Installation

```bash
poetry self add poetry-plugin-ivcap

Usage

poetry ivcap run
poetry ivcap docker-build
poetry ivcap docker-run
poetry ivcap docker-publish
poetry ivcap service-register
poetry ivcap create-service-idget
poetry ivcap tool-register

To get help on the currently installed version

% poetry ivcap

IVCAP plugin

Supporting the development of services and tools for the IVCAP platform

Available subcommands:
    run                 Run the service locally
    docker-build        Build the docker image for this service
    docker-run          Run the service's docker image locally
    docker-publish      Publish the service's docker image to IVCAP
    service-register    Register the service with IVCAP
    create-service-id   Create a unique service ID for the service
    tool-register       Register the service as an AI Tool with IVCAP

Example:
  poetry ivcap run

Configurable optiosn in pyproject.toml:

  [tool.poetry-plugin-ivcap]
  service-file = "service.py"  # The Python file that implements the service
  service-file = "service.py"
  service-id = "urn:ivcap:service:ac158a1f-dfb4-5dac-bf2e-9bf15e0f2cc7" # A unique identifier for the service

  docker-build-template = "docker buildx build -t #DOCKER_NAME#  ."
  docker-run-template = "docker run -rm -p #PORT#:#PORT#"

Development

Build the Plugin Package

poetry build

This creates .whl and .tar.gz files in the dist/ directory.

Publish to PyPI

Create an account at https://pypi.org/account/register/

Add your credentials:

poetry config pypi-token.pypi <your-token>

Publish:

poetry publish --build

Optional: Test on TestPyPI First

To verify your setup without publishing to the real PyPI:

poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry publish -r test-pypi --build

Then test installing via:

poetry self add --source test-pypi poetry-plugin-deploy

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

poetry_plugin_ivcap-0.2.8.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

poetry_plugin_ivcap-0.2.8-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file poetry_plugin_ivcap-0.2.8.tar.gz.

File metadata

  • Download URL: poetry_plugin_ivcap-0.2.8.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.10.10 Darwin/24.3.0

File hashes

Hashes for poetry_plugin_ivcap-0.2.8.tar.gz
Algorithm Hash digest
SHA256 d2c5442bebea0109e110b1c7112ca037b59db262ad9f1ccdafac4abba5e6393a
MD5 2cd88783d9ad8ec3c29971b49f4f5579
BLAKE2b-256 4e89e1b559b7e64e0977ca973732fa779d735d1132f90f85f88c679ff37aa542

See more details on using hashes here.

File details

Details for the file poetry_plugin_ivcap-0.2.8-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_plugin_ivcap-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f0a47846d84a18bb51f068b3da5dc44aeef2836c238d6f6b92e269aeae85ca27
MD5 dd38d40b4849721c4813c30d0c83b1f4
BLAKE2b-256 dcbc0e5a4c571b75c5d5370bb28f3aeb9187c64ad4c11091278e428ebde0aacf

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