Skip to main content

SDK library for building services for the IVCAP platform

Project description

ivcap-service: A python library for building services for the IVCAP platform

Coverity Scan Build Status

A python library containing various helper and environment functions to simplify developing services to be deployed on IVCAP.

Note: A template git repository using this library can be found on github ivcap-works/ivcap-python-ai-tool-template. You may clone that and start from there.

Describe the service

logging_init()
logger = getLogger("app")

service = Service(
    name="Some service",
    contact={
        "name": "Mary Doe",
        "email": "mary.doe@acme.au",
    },
    license_info={
        "name": "MIT",
        "url": "https://opensource.org/license/MIT",
    },
)
class Request(BaseModel):
    jschema: str = Field("urn:sd:schema:some_tool.request.1", alias="$schema")
    ...

class Result(BaseModel):
    jschema: str = Field("urn:sd:schema:some_tool.1", alias="$schema")
    ...

def some_service(req: Request) -> Result:
    """
    Here should go a quite extensive description of what the service can be
    used for so that an agent can work out if this service is useful in
    a specific context.

    DO NOT ADD PARAMTER AND RETURN DECRIPTIONS -
       DESCRIBE THEM IN THE `Request` MODEL
    """
    ...

    return Result(...)

Start the Service

if __name__ == "__main__":
    from ivcap_service import start_batch_service
    some_service(service, consume_compute)

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

ivcap_service-0.6.8.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

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

ivcap_service-0.6.8-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file ivcap_service-0.6.8.tar.gz.

File metadata

  • Download URL: ivcap_service-0.6.8.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.10 Darwin/24.6.0

File hashes

Hashes for ivcap_service-0.6.8.tar.gz
Algorithm Hash digest
SHA256 b6aa72fc3d715c25418703adf553b32c9631996c8df43c17ce786a36f31e1295
MD5 8c6d0e4544c16ec7f9134e491b7b8101
BLAKE2b-256 8b5a2fac94479e7b2603f942c39a65bc2d597d29eb3a9d6477ad631680c926ce

See more details on using hashes here.

File details

Details for the file ivcap_service-0.6.8-py3-none-any.whl.

File metadata

  • Download URL: ivcap_service-0.6.8-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.10 Darwin/24.6.0

File hashes

Hashes for ivcap_service-0.6.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cafb126255d221aadf669d78ab1a3b1afe97a1315d42d5bb3a1cefd6fdeff277
MD5 be63199a40d1fb5006f99ee016042864
BLAKE2b-256 10870644fc10e016a19a3952bfac2e036d5fc68e0680ba8c77a805f007b1908b

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