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.12.tar.gz (18.0 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.12-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ivcap_service-0.6.12.tar.gz
  • Upload date:
  • Size: 18.0 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.12.tar.gz
Algorithm Hash digest
SHA256 5dd4539adea70b60ec0b326235b230b0b6cef3be0bb3b28f354ca49640c05f73
MD5 e977a42d70dc68f4a6b31ebcf5837013
BLAKE2b-256 5792a95cafea69e92420c16f99c0f2f5596087826f35b2cc5c06380d94d512eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ivcap_service-0.6.12-py3-none-any.whl
  • Upload date:
  • Size: 25.6 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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 63301325effc5b2d2b68914aeccdc04d0743a3e8a6581032eb8a92ea2f4d33f6
MD5 e2778962f5a3e74c271e9407405f668a
BLAKE2b-256 5617a1ed510ab75eb152d4951c1746ebf7a398cf2b3da2edf5577ee2ea05de53

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