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.16.tar.gz (18.1 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.16-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ivcap_service-0.6.16.tar.gz
  • Upload date:
  • Size: 18.1 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.16.tar.gz
Algorithm Hash digest
SHA256 ec69954f03a9537cb8896033f79e360bc50c677bf4bb285df8ff840b680815e8
MD5 b0155b9b37b61edbfdfbb1aa219c6824
BLAKE2b-256 e7d8b203a57573ae2a6ba77f971439ac1897533f5391b0732d2f02bde3c9a0ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ivcap_service-0.6.16-py3-none-any.whl
  • Upload date:
  • Size: 25.7 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.16-py3-none-any.whl
Algorithm Hash digest
SHA256 160676b14a118c23f12100940e4e151c1a33a257534d51c76727233cd130c537
MD5 7dfecfc0bc6c168263afe6245bf71343
BLAKE2b-256 9be42e70f9902d7344c6288dc282d28825c2e0650f74d77f5b0f6bf76bd50508

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