semvec/pypi-packages huggingface dataset:
pinexq-client 1.3.0
A hypermedia-based client for the DataCybernetics PinexQ platform.
License: MIT
Requires Python: >=3.11

# PineXQ Python Client

A hypermedia-based client for the DataCybernetics PineXQ platform.

This module contains the submodules:

- `core`: A generic *hypermedia client* (HC) to work with siren hypermedia APIs
[Siren on GitHub](https://github.com/kevinswiber/siren)

- `job_management`: Specialized HC-object (HCO) implementations for the PinexQ *Job-Management API* (JMA).

## Installation

Install from PyPI by running

```pip install pinexq-client```

## Setup the Client

The hypermedia client uses [HTTPX](https://github.com/projectdiscovery/httpx) as a backend.
To access the API you need to provide a pre-configured HTTPX-client with a valid API key for authentication. 
From The API key the user and permissions are derived so do not share the API key and store it securely.

To initialize the client parts must be supplied:

- The API key (as header)
- The API host as URL with port if required

```python
from httpx import Client

from pinexq.client.job_management.enterjma import enter_jma
from pinexq.client.job_management.hcos.entrypoint_hco import EntryPointHco

client = Client(
    base_url="https://myapihost.com:80",
    headers={'x-api-key': '<SECRET_PAT>'}
)

# the client is now ready to be passed to function entering the API
entrypoint: EntryPointHco = enter_jma(client)
```


## Using the API


### Job-Management Interface

There is a convenience layer wrapping job-management-specific objects in interface classes for ease of use.

```python
from pinexq.client.job_management.tool import Job
from pinexq.client.job_management.model import JobStates

job = (
    Job(client)
    .create(name="JobName")
    .select_processing(processing_step="step_function_name")
    .configure_parameters(param_name="value")
    .start()
    .wait_for_completion()
)
result = job.get_result()
```

### Raw Hypermedia API

In the spirit of a hypermedia API you can also use low level calls to navigate the API, 
e.g. when features are not yet exposed in the convenience wrapper.

```python
from pinexq.client.job_management.enterjma import enter_jma
from pinexq.client.job_management.hcos.entrypoint_hco import EntryPointHco
from pinexq.client.job_management.model import CreateJobParameters, SetJobTagsParameters

entrypoint: EntryPointHco = enter_jma(client)
# Get to jobs root
job_root = entrypoint.job_root_link.navigate()
# Create a new job
parameters = CreateJobParameters(name="Test Job")
job = job_root.create_job_action.execute(parameters).navigate()
# Edit the job's tags
job.edit_tags_action.execute(SetJobTagsParameters(tags=["test", ]))

...
```
fastapi-deferred-init 0.2.10
Faster FastAPI start-up time for Projects with many nested routers
License: MIT
Requires Python: >=3.9
Keywords: fastapi, speed, router

# fastapi-deferred-init

![PyPI - Downloads](https://img.shields.io/pypi/dd/fastapi-deferred-init)
[![GitHub license](https://img.shields.io/github/license/jvllmr/fastapi-deferred-init)](https://github.com/jvllmr/fastapi-deferred-init/blob/master/LICENSE)
![Tests](https://github.com/jvllmr/fastapi-deferred-init/actions/workflows/test.yml/badge.svg)

## The Problem

When using nested routers in a FastAPI project its start-up time can get long quite fast.
That is because every router re-calculates the routes defined by a nested router when including it and the pre-calculated values by the nested router never get used. In short: values in nested routers are calculated although they will never be used.

## The Solution

This library provides a modified APIRoute that defers the calculation of values to the first actual attribute access. A router which uses the route as a default is also provided.

## Caveat

When using the deferred APIRoute on every layer of the app, startup errors are deferred to the first time a route is called. So errors related to route registration might go undetected if the route is not tested at least once.

## Pull Request

I created a pull request to merge this change back into FastAPI: https://github.com/tiangolo/fastapi/pull/10589