Compare commits

..

No commits in common. "master" and "0.1.0" have entirely different histories.

61 changed files with 357 additions and 851 deletions

View File

@ -1 +0,0 @@
{"name": "🏃", "description": "Run Docker container to upload Python distribution packages to PyPI", "inputs": {"user": {"description": "PyPI user", "required": false}, "password": {"description": "Password for your PyPI user or an access token", "required": false}, "repository-url": {"description": "The repository URL to use", "required": false}, "packages-dir": {"description": "The target directory for distribution", "required": false}, "verify-metadata": {"description": "Check metadata before uploading", "required": false}, "skip-existing": {"description": "Do not fail if a Python package distribution exists in the target package index", "required": false}, "verbose": {"description": "Show verbose output.", "required": false}, "print-hash": {"description": "Show hash values of files to be uploaded", "required": false}, "attestations": {"description": "[EXPERIMENTAL] Enable experimental support for PEP 740 attestations. Only works with PyPI and TestPyPI via Trusted Publishing.", "required": false}}, "runs": {"using": "docker", "image": "docker://ghcr.io/pypa/gh-action-pypi-publish:release-v1"}}

View File

@ -6,7 +6,7 @@ permissions:
on:
repository_dispatch:
types: [generate]
types: [generate, release]
workflow_dispatch:
inputs:
openapi_url:
@ -25,6 +25,10 @@ jobs:
echo "Error: 'openapi_url' is missing in client_payload."
exit 1
fi
if [ "${{ github.event.action }}" == "release" ] && [ -z "${{ github.event.client_payload.version }}" ]; then
echo "Error: We are supposed to release, but 'version' is missing in client_payload."
exit 1
fi
echo "OPENAPI_URL=${{ github.event.client_payload.openapi_url }}" >> $GITHUB_ENV
else

View File

@ -23,6 +23,7 @@ codex_api_client/models/peers_table.py
codex_api_client/models/purchase.py
codex_api_client/models/reservation.py
codex_api_client/models/sales_availability.py
codex_api_client/models/sales_availability_create.py
codex_api_client/models/sales_availability_read.py
codex_api_client/models/slot.py
codex_api_client/models/slot_agent.py
@ -50,6 +51,7 @@ docs/Purchase.md
docs/Reservation.md
docs/SPRRead.md
docs/SalesAvailability.md
docs/SalesAvailabilityCREATE.md
docs/SalesAvailabilityREAD.md
docs/Slot.md
docs/SlotAgent.md

View File

@ -1 +1 @@
7.12.0
7.10.0

View File

@ -4,8 +4,8 @@ List of endpoints and interfaces available to Codex API users
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 0.0.1
- Package version: 0.4.0
- Generator version: 7.12.0
- Package version: 0.1.0
- Generator version: 7.10.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
## Requirements.
@ -45,13 +45,15 @@ configuration = codex_api_client.Configuration(
with codex_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = codex_api_client.DataApi(api_client)
cid = 'cid_example' # str | Block or dataset to be deleted.
cid = 'cid_example' # str | File to be downloaded.
try:
# Deletes either a single block or an entire dataset from the local node.
api_instance.delete_local(cid)
# Download a file from the local node in a streaming manner. If the file is not available locally, a 404 is returned.
api_response = api_instance.download_local(cid)
print("The response of DataApi->download_local:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling DataApi->delete_local: %s\n" % e)
print("Exception when calling DataApi->download_local: %s\n" % e)
```
@ -61,7 +63,6 @@ All URIs are relative to *http://localhost:8080/api/codex/v1*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DataApi* | [**delete_local**](docs/DataApi.md#delete_local) | **DELETE** /data/{cid} | Deletes either a single block or an entire dataset from the local node.
*DataApi* | [**download_local**](docs/DataApi.md#download_local) | **GET** /data/{cid} | Download a file from the local node in a streaming manner. If the file is not available locally, a 404 is returned.
*DataApi* | [**download_network**](docs/DataApi.md#download_network) | **POST** /data/{cid}/network | Download a file from the network to the local node if it's not available locally. Note: Download is performed async. Call can return before download is completed.
*DataApi* | [**download_network_manifest**](docs/DataApi.md#download_network_manifest) | **GET** /data/{cid}/network/manifest | Download only the dataset manifest from the network to the local node if it's not available locally.
@ -100,6 +101,7 @@ Class | Method | HTTP request | Description
- [Reservation](docs/Reservation.md)
- [SPRRead](docs/SPRRead.md)
- [SalesAvailability](docs/SalesAvailability.md)
- [SalesAvailabilityCREATE](docs/SalesAvailabilityCREATE.md)
- [SalesAvailabilityREAD](docs/SalesAvailabilityREAD.md)
- [Slot](docs/Slot.md)
- [SlotAgent](docs/SlotAgent.md)

View File

@ -6,7 +6,7 @@ info:
description: "List of endpoints and interfaces available to Codex API users"
security:
- {}
- { }
components:
schemas:
@ -27,6 +27,10 @@ components:
maxLength: 66
example: 0x...
BigInt:
type: string
description: Integer represented as decimal string
Cid:
type: string
description: Content Identifier as specified at https://github.com/multiformats/cid
@ -46,27 +50,22 @@ components:
type: string
description: Address of Ethereum address
PricePerBytePerSecond:
Reward:
type: string
description: The amount of tokens paid per byte per second per slot to hosts the client is willing to pay
CollateralPerByte:
type: string
description: Number as decimal string that represents how much collateral per byte is asked from hosts that wants to fill a slots
description: The maximum amount of tokens paid per second per slot to hosts the client is willing to pay
Duration:
type: integer
format: int64
description: The duration of the request in seconds
type: string
description: The duration of the request in seconds as decimal string
ProofProbability:
type: string
description: How often storage proofs are required as decimal string
Expiry:
type: integer
format: int64
type: string
description: A timestamp as seconds since unix epoch at which this request expires if the Request does not find requested amount of nodes to host the data.
default: 10 minutes
SPR:
type: string
@ -74,8 +73,6 @@ components:
SPRRead:
type: object
required:
- spr
properties:
spr:
$ref: "#/components/schemas/SPR"
@ -88,8 +85,6 @@ components:
Content:
type: object
required:
- cid
description: Parameters specifying the content
properties:
cid:
@ -97,12 +92,6 @@ components:
Node:
type: object
required:
- nodeId
- peerId
- record
- address
- seen
properties:
nodeId:
type: string
@ -124,15 +113,9 @@ components:
revision:
type: string
example: 0c647d8
contracts:
type: string
example: 0b537c7
PeersTable:
type: object
required:
- localNode
- nodes
properties:
localNode:
$ref: "#/components/schemas/Node"
@ -143,14 +126,6 @@ components:
DebugInfo:
type: object
required:
- id
- addrs
- repo
- spr
- announceAddresses
- table
- codex
properties:
id:
$ref: "#/components/schemas/PeerId"
@ -163,10 +138,6 @@ components:
description: Path of the data repository where all nodes data are stored
spr:
$ref: "#/components/schemas/SPR"
announceAddresses:
type: array
items:
$ref: "#/components/schemas/MultiAddress"
table:
$ref: "#/components/schemas/PeersTable"
codex:
@ -174,82 +145,58 @@ components:
SalesAvailability:
type: object
required:
- totalSize
- duration
- minPricePerBytePerSecond
- totalCollateral
properties:
id:
$ref: "#/components/schemas/Id"
totalSize:
type: integer
format: int64
description: Total size of availability's storage in bytes
type: string
description: Total size of availability's storage in bytes as decimal string
duration:
$ref: "#/components/schemas/Duration"
minPricePerBytePerSecond:
minPrice:
type: string
description: Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string
totalCollateral:
description: Minimal price paid (in amount of tokens) for the whole hosted request's slot for the request's duration as decimal string
maxCollateral:
type: string
description: Total collateral (in amount of tokens) that can be used for matching requests
enabled:
type: boolean
description: Enable the ability to receive sales on this availability.
default: true
until:
type: integer
description: Specifies the latest timestamp, after which the availability will no longer host any slots. If set to 0, there will be no restrictions.
default: 0
description: Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string
SalesAvailabilityREAD:
required:
- id
- totalRemainingCollateral
- freeSize
allOf:
- $ref: "#/components/schemas/SalesAvailability"
- type: object
properties:
id:
$ref: "#/components/schemas/Id"
readonly: true
freeSize:
type: integer
format: int64
description: Unused size of availability's storage in bytes as decimal string
readOnly: true
totalRemainingCollateral:
type: string
description: Total collateral effective (in amount of tokens) that can be used for matching requests
readOnly: true
description: Unused size of availability's storage in bytes as decimal string
SalesAvailabilityCREATE:
allOf:
- $ref: "#/components/schemas/SalesAvailability"
- required:
- totalSize
- minPrice
- maxCollateral
- duration
Slot:
type: object
required:
- id
- request
- slotIndex
properties:
id:
$ref: "#/components/schemas/SlotId"
request:
$ref: "#/components/schemas/StorageRequest"
slotIndex:
type: integer
format: int64
description: Slot Index number
type: string
description: Slot Index as decimal string
SlotAgent:
type: object
required:
- state
- requestId
- slotIndex
properties:
id:
$ref: "#/components/schemas/SlotId"
slotIndex:
type: integer
format: int64
description: Slot Index number
type: string
description: Slot Index as decimal string
requestId:
$ref: "#/components/schemas/Id"
request:
@ -276,104 +223,71 @@ components:
Reservation:
type: object
required:
- id
- availabilityId
- size
- requestId
- slotIndex
- validUntil
properties:
id:
$ref: "#/components/schemas/Id"
availabilityId:
$ref: "#/components/schemas/Id"
size:
type: integer
format: int64
description: Size of the slot in bytes
$ref: "#/components/schemas/BigInt"
requestId:
$ref: "#/components/schemas/Id"
slotIndex:
type: integer
format: int64
description: Slot Index number
validUntil:
type: integer
description: Timestamp after which the reservation will no longer be valid.
type: string
description: Slot Index as decimal string
StorageRequestCreation:
type: object
required:
- pricePerBytePerSecond
- reward
- duration
- proofProbability
- collateralPerByte
- collateral
- expiry
properties:
duration:
$ref: "#/components/schemas/Duration"
pricePerBytePerSecond:
$ref: "#/components/schemas/PricePerBytePerSecond"
reward:
$ref: "#/components/schemas/Reward"
proofProbability:
$ref: "#/components/schemas/ProofProbability"
nodes:
description: Minimal number of nodes the content should be stored on
type: integer
default: 3
minimum: 3
default: 1
tolerance:
description: Additional number of nodes on top of the `nodes` property that can be lost before pronouncing the content lost
type: integer
default: 1
minimum: 1
collateralPerByte:
$ref: "#/components/schemas/CollateralPerByte"
default: 0
collateral:
type: string
description: Number as decimal string that represents how much collateral is asked from hosts that wants to fill a slots
expiry:
type: integer
format: int64
description: Number that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request's duration itself.
type: string
description: Number as decimal string that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request's duration itself.
StorageAsk:
type: object
required:
- slots
- slotSize
- duration
- proofProbability
- pricePerBytePerSecond
- collateralPerByte
- maxSlotLoss
- reward
properties:
slots:
description: Number of slots (eq. hosts) that the Request want to have the content spread over
type: integer
format: int64
slotSize:
type: integer
format: int64
description: Amount of storage per slot in bytes
type: string
description: Amount of storage per slot (in bytes) as decimal string
duration:
$ref: "#/components/schemas/Duration"
proofProbability:
$ref: "#/components/schemas/ProofProbability"
pricePerBytePerSecond:
$ref: "#/components/schemas/PricePerBytePerSecond"
collateralPerByte:
$ref: "#/components/schemas/CollateralPerByte"
reward:
$ref: "#/components/schemas/Reward"
maxSlotLoss:
type: integer
format: int64
description: Max slots that can be lost without data considered to be lost
StorageRequest:
type: object
required:
- id
- client
- ask
- content
- expiry
- nonce
properties:
id:
type: string
@ -392,16 +306,13 @@ components:
Purchase:
type: object
required:
- state
- requestId
properties:
state:
type: string
description: Description of the Request's state
enum:
- cancelled
- errored
- error
- failed
- finished
- pending
@ -410,17 +321,12 @@ components:
- unknown
error:
type: string
nullable: true
description: If Request failed, then here is presented the error message
request:
$ref: "#/components/schemas/StorageRequest"
requestId:
$ref: "#/components/schemas/Id"
DataList:
type: object
required:
- content
properties:
content:
type: array
@ -429,9 +335,6 @@ components:
DataItem:
type: object
required:
- cid
- manifest
properties:
cid:
$ref: "#/components/schemas/Cid"
@ -440,11 +343,6 @@ components:
ManifestItem:
type: object
required:
- treeCid
- datasetSize
- blockSize
- protected
properties:
treeCid:
$ref: "#/components/schemas/Cid"
@ -469,14 +367,15 @@ components:
nullable: true
description: "The original mimetype of the uploaded content (optional)"
example: image/png
uploadedAt:
type: integer
format: int64
nullable: true
description: "The UTC upload timestamp in seconds"
example: 1729244192
Space:
type: object
required:
- totalBlocks
- quotaMaxBytes
- quotaUsedBytes
- quotaReservedBytes
properties:
totalBlocks:
description: "Number of blocks stored by the node"
@ -515,7 +414,7 @@ paths:
description: |
If `addrs` param is supplied, it will be used to dial the peer, otherwise the `peerId` is used
to invoke peer discovery, if it succeeds the returned addresses will be used to dial.
tags: [Node]
tags: [ Node ]
operationId: connectPeer
parameters:
- in: path
@ -545,7 +444,7 @@ paths:
"/data":
get:
summary: "Lists manifest CIDs stored locally in node."
tags: [Data]
tags: [ Data ]
operationId: listData
responses:
"200":
@ -565,7 +464,7 @@ paths:
description: Well it was bad-bad
post:
summary: "Upload a file in a streaming manner. Once finished, the file is stored in the node and can be retrieved by any node in the network using the returned CID."
tags: [Data]
tags: [ Data ]
operationId: upload
parameters:
- name: content-type
@ -581,7 +480,7 @@ paths:
description: The content disposition used to send the filename.
schema:
type: string
example: 'attachment; filename="codex.png"'
example: "attachment; filename=\"codex.png\""
requestBody:
content:
application/octet-stream:
@ -595,15 +494,13 @@ paths:
text/plain:
schema:
type: string
"422":
description: The mimetype of the filename is invalid
"500":
description: Well it was bad-bad and the upload did not work out
"/data/{cid}":
get:
summary: "Download a file from the local node in a streaming manner. If the file is not available locally, a 404 is returned."
tags: [Data]
tags: [ Data ]
operationId: downloadLocal
parameters:
- in: path
@ -628,30 +525,10 @@ paths:
"500":
description: Well it was bad-bad
delete:
summary: "Deletes either a single block or an entire dataset from the local node."
tags: [Data]
operationId: deleteLocal
parameters:
- in: path
name: cid
required: true
schema:
$ref: "#/components/schemas/Cid"
description: Block or dataset to be deleted.
responses:
"204":
description: Data was successfully deleted.
"400":
description: Invalid CID is specified
"500":
description: There was an error during deletion
"/data/{cid}/network":
post:
summary: "Download a file from the network to the local node if it's not available locally. Note: Download is performed async. Call can return before download is completed."
tags: [Data]
tags: [ Data ]
operationId: downloadNetwork
parameters:
- in: path
@ -677,7 +554,7 @@ paths:
"/data/{cid}/network/stream":
get:
summary: "Download a file from the network in a streaming manner. If the file is not available locally, it will be retrieved from other nodes in the network if able."
tags: [Data]
tags: [ Data ]
operationId: downloadNetworkStream
parameters:
- in: path
@ -704,7 +581,7 @@ paths:
"/data/{cid}/network/manifest":
get:
summary: "Download only the dataset manifest from the network to the local node if it's not available locally."
tags: [Data]
tags: [ Data ]
operationId: downloadNetworkManifest
parameters:
- in: path
@ -730,7 +607,7 @@ paths:
"/space":
get:
summary: "Gets a summary of the storage space allocation of the node."
tags: [Data]
tags: [ Data ]
operationId: space
responses:
"200":
@ -746,7 +623,7 @@ paths:
"/sales/slots":
get:
summary: "Returns active slots"
tags: [Marketplace]
tags: [ Marketplace ]
operationId: getActiveSlots
responses:
"200":
@ -764,7 +641,7 @@ paths:
"/sales/slots/{slotId}":
get:
summary: "Returns active slot with id {slotId} for the host"
tags: [Marketplace]
tags: [ Marketplace ]
operationId: getActiveSlotById
parameters:
- in: path
@ -793,7 +670,7 @@ paths:
"/sales/availability":
get:
summary: "Returns storage that is for sale"
tags: [Marketplace]
tags: [ Marketplace ]
operationId: getAvailabilities
responses:
"200":
@ -812,12 +689,12 @@ paths:
post:
summary: "Offers storage for sale"
operationId: offerStorage
tags: [Marketplace]
tags: [ Marketplace ]
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/SalesAvailability"
$ref: "#/components/schemas/SalesAvailabilityCREATE"
responses:
"201":
description: Created storage availability
@ -828,7 +705,7 @@ paths:
"400":
description: Invalid data input
"422":
description: Not enough node's storage quota available or the provided parameters did not pass validation
description: Not enough node's storage quota available
"500":
description: Error reserving availability
"503":
@ -840,7 +717,7 @@ paths:
The new parameters will be only considered for new requests.
Existing Requests linked to this Availability will continue as is.
operationId: updateOfferedStorage
tags: [Marketplace]
tags: [ Marketplace ]
parameters:
- in: path
name: id
@ -861,7 +738,7 @@ paths:
"404":
description: Availability not found
"422":
description: The provided parameters did not pass validation
description: Not enough node's storage quota available
"500":
description: Error reserving availability
"503":
@ -872,7 +749,7 @@ paths:
summary: "Get availability's reservations"
description: Return's list of Reservations for ongoing Storage Requests that the node hosts.
operationId: getReservations
tags: [Marketplace]
tags: [ Marketplace ]
parameters:
- in: path
name: id
@ -901,7 +778,7 @@ paths:
"/storage/request/{cid}":
post:
summary: "Creates a new Request for storage"
tags: [Marketplace]
tags: [ Marketplace ]
operationId: createStorageRequest
parameters:
- in: path
@ -924,8 +801,6 @@ paths:
type: string
"400":
description: Invalid or missing Request ID
"422":
description: The storage request parameters are not valid
"404":
description: Request ID not found
"503":
@ -934,7 +809,7 @@ paths:
"/storage/purchases":
get:
summary: "Returns list of purchase IDs"
tags: [Marketplace]
tags: [ Marketplace ]
operationId: getPurchases
responses:
"200":
@ -951,7 +826,7 @@ paths:
"/storage/purchases/{id}":
get:
summary: "Returns purchase details"
tags: [Marketplace]
tags: [ Marketplace ]
operationId: getPurchase
parameters:
- in: path
@ -978,12 +853,12 @@ paths:
get:
summary: "Get Node's SPR"
operationId: getSPR
tags: [Node]
tags: [ Node ]
responses:
"200":
description: Node's SPR
content:
text/plain:
plain/text:
schema:
$ref: "#/components/schemas/SPR"
application/json:
@ -996,12 +871,12 @@ paths:
get:
summary: "Get Node's PeerID"
operationId: getPeerId
tags: [Node]
tags: [ Node ]
responses:
"200":
description: Node's Peer ID
content:
text/plain:
plain/text:
schema:
$ref: "#/components/schemas/PeerId"
application/json:
@ -1011,7 +886,7 @@ paths:
"/debug/chronicles/loglevel":
post:
summary: "Set log level at run time"
tags: [Debug]
tags: [ Debug ]
operationId: setDebugLogLevel
parameters:
@ -1033,7 +908,7 @@ paths:
get:
summary: "Gets node information"
operationId: getDebugInfo
tags: [Debug]
tags: [ Debug ]
responses:
"200":
description: Node's information

View File

@ -14,7 +14,7 @@
""" # noqa: E501
__version__ = "0.4.0"
__version__ = "0.1.0"
# import apis into sdk package
from codex_api_client.api.data_api import DataApi
@ -47,6 +47,7 @@ from codex_api_client.models.purchase import Purchase
from codex_api_client.models.reservation import Reservation
from codex_api_client.models.spr_read import SPRRead
from codex_api_client.models.sales_availability import SalesAvailability
from codex_api_client.models.sales_availability_create import SalesAvailabilityCREATE
from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD
from codex_api_client.models.slot import Slot
from codex_api_client.models.slot_agent import SlotAgent

View File

@ -41,262 +41,6 @@ class DataApi:
self.api_client = api_client
@validate_call
def delete_local(
self,
cid: Annotated[StrictStr, Field(description="Block or dataset to be deleted.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> None:
"""Deletes either a single block or an entire dataset from the local node.
:param cid: Block or dataset to be deleted. (required)
:type cid: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_local_serialize(
cid=cid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
'400': None,
'500': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def delete_local_with_http_info(
self,
cid: Annotated[StrictStr, Field(description="Block or dataset to be deleted.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[None]:
"""Deletes either a single block or an entire dataset from the local node.
:param cid: Block or dataset to be deleted. (required)
:type cid: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_local_serialize(
cid=cid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
'400': None,
'500': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def delete_local_without_preload_content(
self,
cid: Annotated[StrictStr, Field(description="Block or dataset to be deleted.")],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Deletes either a single block or an entire dataset from the local node.
:param cid: Block or dataset to be deleted. (required)
:type cid: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_local_serialize(
cid=cid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
'400': None,
'500': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _delete_local_serialize(
self,
cid,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
if cid is not None:
_path_params['cid'] = cid
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# authentication setting
_auth_settings: List[str] = [
]
return self.api_client.param_serialize(
method='DELETE',
resource_path='/data/{cid}',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def download_local(
self,
@ -1922,7 +1666,6 @@ class DataApi:
_response_types_map: Dict[str, Optional[str]] = {
'200': "str",
'422': None,
'500': None,
}
response_data = self.api_client.call_api(
@ -1998,7 +1741,6 @@ class DataApi:
_response_types_map: Dict[str, Optional[str]] = {
'200': "str",
'422': None,
'500': None,
}
response_data = self.api_client.call_api(
@ -2074,7 +1816,6 @@ class DataApi:
_response_types_map: Dict[str, Optional[str]] = {
'200': "str",
'422': None,
'500': None,
}
response_data = self.api_client.call_api(

View File

@ -22,6 +22,7 @@ from typing_extensions import Annotated
from codex_api_client.models.purchase import Purchase
from codex_api_client.models.reservation import Reservation
from codex_api_client.models.sales_availability import SalesAvailability
from codex_api_client.models.sales_availability_create import SalesAvailabilityCREATE
from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD
from codex_api_client.models.slot import Slot
from codex_api_client.models.slot_agent import SlotAgent
@ -104,7 +105,6 @@ class MarketplaceApi:
_response_types_map: Dict[str, Optional[str]] = {
'200': "str",
'400': None,
'422': None,
'404': None,
'503': None,
}
@ -178,7 +178,6 @@ class MarketplaceApi:
_response_types_map: Dict[str, Optional[str]] = {
'200': "str",
'400': None,
'422': None,
'404': None,
'503': None,
}
@ -252,7 +251,6 @@ class MarketplaceApi:
_response_types_map: Dict[str, Optional[str]] = {
'200': "str",
'400': None,
'422': None,
'404': None,
'503': None,
}
@ -1887,7 +1885,7 @@ class MarketplaceApi:
@validate_call
def offer_storage(
self,
sales_availability: Optional[SalesAvailability] = None,
sales_availability_create: Optional[SalesAvailabilityCREATE] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@ -1904,8 +1902,8 @@ class MarketplaceApi:
"""Offers storage for sale
:param sales_availability:
:type sales_availability: SalesAvailability
:param sales_availability_create:
:type sales_availability_create: SalesAvailabilityCREATE
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@ -1929,7 +1927,7 @@ class MarketplaceApi:
""" # noqa: E501
_param = self._offer_storage_serialize(
sales_availability=sales_availability,
sales_availability_create=sales_availability_create,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@ -1957,7 +1955,7 @@ class MarketplaceApi:
@validate_call
def offer_storage_with_http_info(
self,
sales_availability: Optional[SalesAvailability] = None,
sales_availability_create: Optional[SalesAvailabilityCREATE] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@ -1974,8 +1972,8 @@ class MarketplaceApi:
"""Offers storage for sale
:param sales_availability:
:type sales_availability: SalesAvailability
:param sales_availability_create:
:type sales_availability_create: SalesAvailabilityCREATE
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@ -1999,7 +1997,7 @@ class MarketplaceApi:
""" # noqa: E501
_param = self._offer_storage_serialize(
sales_availability=sales_availability,
sales_availability_create=sales_availability_create,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@ -2027,7 +2025,7 @@ class MarketplaceApi:
@validate_call
def offer_storage_without_preload_content(
self,
sales_availability: Optional[SalesAvailability] = None,
sales_availability_create: Optional[SalesAvailabilityCREATE] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@ -2044,8 +2042,8 @@ class MarketplaceApi:
"""Offers storage for sale
:param sales_availability:
:type sales_availability: SalesAvailability
:param sales_availability_create:
:type sales_availability_create: SalesAvailabilityCREATE
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
@ -2069,7 +2067,7 @@ class MarketplaceApi:
""" # noqa: E501
_param = self._offer_storage_serialize(
sales_availability=sales_availability,
sales_availability_create=sales_availability_create,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@ -2092,7 +2090,7 @@ class MarketplaceApi:
def _offer_storage_serialize(
self,
sales_availability,
sales_availability_create,
_request_auth,
_content_type,
_headers,
@ -2118,8 +2116,8 @@ class MarketplaceApi:
# process the header parameters
# process the form parameters
# process the body parameter
if sales_availability is not None:
_body_params = sales_availability
if sales_availability_create is not None:
_body_params = sales_availability_create
# set the HTTP header `Accept`

View File

@ -527,7 +527,7 @@ class NodeApi:
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'text/plain',
'plain/text',
'application/json'
]
)
@ -773,7 +773,7 @@ class NodeApi:
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'text/plain',
'plain/text',
'application/json'
]
)

View File

@ -517,7 +517,7 @@ class ApiClient:
if k in collection_formats:
collection_format = collection_formats[k]
if collection_format == 'multi':
new_params.extend((k, quote(str(value))) for value in v)
new_params.extend((k, str(value)) for value in v)
else:
if collection_format == 'ssv':
delimiter = ' '

View File

@ -18,7 +18,7 @@ import logging
from logging import FileHandler
import multiprocessing
import sys
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
from typing_extensions import NotRequired, Self
import urllib3
@ -160,8 +160,6 @@ class Configuration:
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
in PEM format.
:param retries: Number of retries for API requests.
:param ca_cert_data: verify the peer using concatenated CA certificate data
in PEM (str) or DER (bytes) format.
"""
@ -175,14 +173,13 @@ class Configuration:
username: Optional[str]=None,
password: Optional[str]=None,
access_token: Optional[str]=None,
server_index: Optional[int]=None,
server_index: Optional[int]=None,
server_variables: Optional[ServerVariablesT]=None,
server_operation_index: Optional[Dict[int, int]]=None,
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
ignore_operation_servers: bool=False,
ssl_ca_cert: Optional[str]=None,
retries: Optional[int] = None,
ca_cert_data: Optional[Union[str, bytes]] = None,
*,
debug: Optional[bool] = None,
) -> None:
@ -260,10 +257,6 @@ class Configuration:
self.ssl_ca_cert = ssl_ca_cert
"""Set this to customize the certificate file to verify the peer.
"""
self.ca_cert_data = ca_cert_data
"""Set this to verify the peer using PEM (str) or DER (bytes)
certificate data.
"""
self.cert_file = None
"""client certificate file
"""
@ -501,7 +494,7 @@ class Configuration:
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 0.0.1\n"\
"SDK Package Version: 0.4.0".\
"SDK Package Version: 0.1.0".\
format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self) -> List[HostSetting]:

View File

@ -150,13 +150,6 @@ class ApiException(OpenApiException):
if http_resp.status == 404:
raise NotFoundException(http_resp=http_resp, body=body, data=data)
# Added new conditions for 409 and 422
if http_resp.status == 409:
raise ConflictException(http_resp=http_resp, body=body, data=data)
if http_resp.status == 422:
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
if 500 <= http_resp.status <= 599:
raise ServiceException(http_resp=http_resp, body=body, data=data)
raise ApiException(http_resp=http_resp, body=body, data=data)
@ -195,16 +188,6 @@ class ServiceException(ApiException):
pass
class ConflictException(ApiException):
"""Exception for HTTP 409 Conflict."""
pass
class UnprocessableEntityException(ApiException):
"""Exception for HTTP 422 Unprocessable Entity."""
pass
def render_path(path_to_item):
"""Returns a string representation of a path"""
result = ""

View File

@ -27,6 +27,7 @@ from codex_api_client.models.purchase import Purchase
from codex_api_client.models.reservation import Reservation
from codex_api_client.models.spr_read import SPRRead
from codex_api_client.models.sales_availability import SalesAvailability
from codex_api_client.models.sales_availability_create import SalesAvailabilityCREATE
from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD
from codex_api_client.models.slot import Slot
from codex_api_client.models.slot_agent import SlotAgent

View File

@ -28,8 +28,7 @@ class CodexVersion(BaseModel):
""" # noqa: E501
version: Optional[StrictStr] = None
revision: Optional[StrictStr] = None
contracts: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["version", "revision", "contracts"]
__properties: ClassVar[List[str]] = ["version", "revision"]
model_config = ConfigDict(
populate_by_name=True,
@ -83,8 +82,7 @@ class CodexVersion(BaseModel):
_obj = cls.model_validate({
"version": obj.get("version"),
"revision": obj.get("revision"),
"contracts": obj.get("contracts")
"revision": obj.get("revision")
})
return _obj

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@ -26,7 +26,7 @@ class Content(BaseModel):
"""
Parameters specifying the content
""" # noqa: E501
cid: StrictStr = Field(description="Content Identifier as specified at https://github.com/multiformats/cid")
cid: Optional[StrictStr] = Field(default=None, description="Content Identifier as specified at https://github.com/multiformats/cid")
__properties: ClassVar[List[str]] = ["cid"]
model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from codex_api_client.models.manifest_item import ManifestItem
from typing import Optional, Set
from typing_extensions import Self
@ -27,8 +27,8 @@ class DataItem(BaseModel):
"""
DataItem
""" # noqa: E501
cid: StrictStr = Field(description="Content Identifier as specified at https://github.com/multiformats/cid")
manifest: ManifestItem
cid: Optional[StrictStr] = Field(default=None, description="Content Identifier as specified at https://github.com/multiformats/cid")
manifest: Optional[ManifestItem] = None
__properties: ClassVar[List[str]] = ["cid", "manifest"]
model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from codex_api_client.models.data_item import DataItem
from typing import Optional, Set
from typing_extensions import Self
@ -27,7 +27,7 @@ class DataList(BaseModel):
"""
DataList
""" # noqa: E501
content: List[DataItem]
content: Optional[List[DataItem]] = None
__properties: ClassVar[List[str]] = ["content"]
model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from codex_api_client.models.codex_version import CodexVersion
from codex_api_client.models.peers_table import PeersTable
from typing import Optional, Set
@ -28,14 +28,13 @@ class DebugInfo(BaseModel):
"""
DebugInfo
""" # noqa: E501
id: StrictStr = Field(description="Peer Identity reference as specified at https://docs.libp2p.io/concepts/fundamentals/peers/")
addrs: List[StrictStr]
repo: StrictStr = Field(description="Path of the data repository where all nodes data are stored")
spr: StrictStr = Field(description="Signed Peer Record (libp2p)")
announce_addresses: List[StrictStr] = Field(alias="announceAddresses")
table: PeersTable
codex: CodexVersion
__properties: ClassVar[List[str]] = ["id", "addrs", "repo", "spr", "announceAddresses", "table", "codex"]
id: Optional[StrictStr] = Field(default=None, description="Peer Identity reference as specified at https://docs.libp2p.io/concepts/fundamentals/peers/")
addrs: Optional[List[StrictStr]] = None
repo: Optional[StrictStr] = Field(default=None, description="Path of the data repository where all nodes data are stored")
spr: Optional[StrictStr] = Field(default=None, description="Signed Peer Record (libp2p)")
table: Optional[PeersTable] = None
codex: Optional[CodexVersion] = None
__properties: ClassVar[List[str]] = ["id", "addrs", "repo", "spr", "table", "codex"]
model_config = ConfigDict(
populate_by_name=True,
@ -98,7 +97,6 @@ class DebugInfo(BaseModel):
"addrs": obj.get("addrs"),
"repo": obj.get("repo"),
"spr": obj.get("spr"),
"announceAddresses": obj.get("announceAddresses"),
"table": PeersTable.from_dict(obj["table"]) if obj.get("table") is not None else None,
"codex": CodexVersion.from_dict(obj["codex"]) if obj.get("codex") is not None else None
})

View File

@ -26,13 +26,14 @@ class ManifestItem(BaseModel):
"""
ManifestItem
""" # noqa: E501
tree_cid: StrictStr = Field(description="Content Identifier as specified at https://github.com/multiformats/cid", alias="treeCid")
dataset_size: StrictInt = Field(description="Length of original content in bytes", alias="datasetSize")
block_size: StrictInt = Field(description="Size of blocks", alias="blockSize")
protected: StrictBool = Field(description="Indicates if content is protected by erasure-coding")
tree_cid: Optional[StrictStr] = Field(default=None, description="Content Identifier as specified at https://github.com/multiformats/cid", alias="treeCid")
dataset_size: Optional[StrictInt] = Field(default=None, description="Length of original content in bytes", alias="datasetSize")
block_size: Optional[StrictInt] = Field(default=None, description="Size of blocks", alias="blockSize")
protected: Optional[StrictBool] = Field(default=None, description="Indicates if content is protected by erasure-coding")
filename: Optional[StrictStr] = Field(default=None, description="The original name of the uploaded content (optional)")
mimetype: Optional[StrictStr] = Field(default=None, description="The original mimetype of the uploaded content (optional)")
__properties: ClassVar[List[str]] = ["treeCid", "datasetSize", "blockSize", "protected", "filename", "mimetype"]
uploaded_at: Optional[StrictInt] = Field(default=None, description="The UTC upload timestamp in seconds", alias="uploadedAt")
__properties: ClassVar[List[str]] = ["treeCid", "datasetSize", "blockSize", "protected", "filename", "mimetype", "uploadedAt"]
model_config = ConfigDict(
populate_by_name=True,
@ -83,6 +84,11 @@ class ManifestItem(BaseModel):
if self.mimetype is None and "mimetype" in self.model_fields_set:
_dict['mimetype'] = None
# set to None if uploaded_at (nullable) is None
# and model_fields_set contains the field
if self.uploaded_at is None and "uploaded_at" in self.model_fields_set:
_dict['uploadedAt'] = None
return _dict
@classmethod
@ -100,7 +106,8 @@ class ManifestItem(BaseModel):
"blockSize": obj.get("blockSize"),
"protected": obj.get("protected"),
"filename": obj.get("filename"),
"mimetype": obj.get("mimetype")
"mimetype": obj.get("mimetype"),
"uploadedAt": obj.get("uploadedAt")
})
return _obj

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@ -26,11 +26,11 @@ class Node(BaseModel):
"""
Node
""" # noqa: E501
node_id: StrictStr = Field(alias="nodeId")
peer_id: StrictStr = Field(alias="peerId")
record: StrictStr
address: StrictStr
seen: StrictBool
node_id: Optional[StrictStr] = Field(default=None, alias="nodeId")
peer_id: Optional[StrictStr] = Field(default=None, alias="peerId")
record: Optional[StrictStr] = None
address: Optional[StrictStr] = None
seen: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = ["nodeId", "peerId", "record", "address", "seen"]
model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from codex_api_client.models.node import Node
from typing import Optional, Set
from typing_extensions import Self
@ -27,8 +27,8 @@ class PeersTable(BaseModel):
"""
PeersTable
""" # noqa: E501
local_node: Node = Field(alias="localNode")
nodes: List[Node]
local_node: Optional[Node] = Field(default=None, alias="localNode")
nodes: Optional[List[Node]] = None
__properties: ClassVar[List[str]] = ["localNode", "nodes"]
model_config = ConfigDict(

View File

@ -19,7 +19,6 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from codex_api_client.models.storage_request import StorageRequest
from typing import Optional, Set
from typing_extensions import Self
@ -28,17 +27,19 @@ class Purchase(BaseModel):
"""
Purchase
""" # noqa: E501
state: StrictStr = Field(description="Description of the Request's state")
state: Optional[StrictStr] = Field(default=None, description="Description of the Request's state")
error: Optional[StrictStr] = Field(default=None, description="If Request failed, then here is presented the error message")
request: Optional[StorageRequest] = None
request_id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.", alias="requestId")
__properties: ClassVar[List[str]] = ["state", "error", "request", "requestId"]
__properties: ClassVar[List[str]] = ["state", "error", "request"]
@field_validator('state')
def state_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(['cancelled', 'errored', 'failed', 'finished', 'pending', 'started', 'submitted', 'unknown']):
raise ValueError("must be one of enum values ('cancelled', 'errored', 'failed', 'finished', 'pending', 'started', 'submitted', 'unknown')")
if value is None:
return value
if value not in set(['cancelled', 'error', 'failed', 'finished', 'pending', 'started', 'submitted', 'unknown']):
raise ValueError("must be one of enum values ('cancelled', 'error', 'failed', 'finished', 'pending', 'started', 'submitted', 'unknown')")
return value
model_config = ConfigDict(
@ -83,11 +84,6 @@ class Purchase(BaseModel):
# override the default output from pydantic by calling `to_dict()` of request
if self.request:
_dict['request'] = self.request.to_dict()
# set to None if error (nullable) is None
# and model_fields_set contains the field
if self.error is None and "error" in self.model_fields_set:
_dict['error'] = None
return _dict
@classmethod
@ -102,8 +98,7 @@ class Purchase(BaseModel):
_obj = cls.model_validate({
"state": obj.get("state"),
"error": obj.get("error"),
"request": StorageRequest.from_dict(obj["request"]) if obj.get("request") is not None else None,
"requestId": obj.get("requestId")
"request": StorageRequest.from_dict(obj["request"]) if obj.get("request") is not None else None
})
return _obj

View File

@ -17,8 +17,8 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@ -27,13 +27,12 @@ class Reservation(BaseModel):
"""
Reservation
""" # noqa: E501
id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.")
availability_id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.", alias="availabilityId")
size: StrictInt = Field(description="Size of the slot in bytes")
request_id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.", alias="requestId")
slot_index: StrictInt = Field(description="Slot Index number", alias="slotIndex")
valid_until: StrictInt = Field(description="Timestamp after which the reservation will no longer be valid.", alias="validUntil")
__properties: ClassVar[List[str]] = ["id", "availabilityId", "size", "requestId", "slotIndex", "validUntil"]
id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.")
availability_id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.", alias="availabilityId")
size: Optional[StrictStr] = Field(default=None, description="Integer represented as decimal string")
request_id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.", alias="requestId")
slot_index: Optional[StrictStr] = Field(default=None, description="Slot Index as decimal string", alias="slotIndex")
__properties: ClassVar[List[str]] = ["id", "availabilityId", "size", "requestId", "slotIndex"]
model_config = ConfigDict(
populate_by_name=True,
@ -90,8 +89,7 @@ class Reservation(BaseModel):
"availabilityId": obj.get("availabilityId"),
"size": obj.get("size"),
"requestId": obj.get("requestId"),
"slotIndex": obj.get("slotIndex"),
"validUntil": obj.get("validUntil")
"slotIndex": obj.get("slotIndex")
})
return _obj

View File

@ -17,8 +17,9 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@ -26,13 +27,12 @@ class SalesAvailability(BaseModel):
"""
SalesAvailability
""" # noqa: E501
total_size: StrictInt = Field(description="Total size of availability's storage in bytes", alias="totalSize")
duration: StrictInt = Field(description="The duration of the request in seconds")
min_price_per_byte_per_second: StrictStr = Field(description="Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string", alias="minPricePerBytePerSecond")
total_collateral: StrictStr = Field(description="Total collateral (in amount of tokens) that can be used for matching requests", alias="totalCollateral")
enabled: Optional[StrictBool] = Field(default=True, description="Enable the ability to receive sales on this availability.")
until: Optional[StrictInt] = Field(default=0, description="Specifies the latest timestamp, after which the availability will no longer host any slots. If set to 0, there will be no restrictions.")
__properties: ClassVar[List[str]] = ["totalSize", "duration", "minPricePerBytePerSecond", "totalCollateral", "enabled", "until"]
id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.")
total_size: Optional[StrictStr] = Field(default=None, description="Total size of availability's storage in bytes as decimal string", alias="totalSize")
duration: Optional[StrictStr] = Field(default=None, description="The duration of the request in seconds as decimal string")
min_price: Optional[StrictStr] = Field(default=None, description="Minimal price paid (in amount of tokens) for the whole hosted request's slot for the request's duration as decimal string", alias="minPrice")
max_collateral: Optional[StrictStr] = Field(default=None, description="Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string", alias="maxCollateral")
__properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPrice", "maxCollateral"]
model_config = ConfigDict(
populate_by_name=True,
@ -85,12 +85,11 @@ class SalesAvailability(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"id": obj.get("id"),
"totalSize": obj.get("totalSize"),
"duration": obj.get("duration"),
"minPricePerBytePerSecond": obj.get("minPricePerBytePerSecond"),
"totalCollateral": obj.get("totalCollateral"),
"enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
"until": obj.get("until") if obj.get("until") is not None else 0
"minPrice": obj.get("minPrice"),
"maxCollateral": obj.get("maxCollateral")
})
return _obj

View File

@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
@ -28,11 +28,11 @@ class SalesAvailabilityCREATE(BaseModel):
SalesAvailabilityCREATE
""" # noqa: E501
id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.")
total_size: StrictInt = Field(description="Total size of availability's storage in bytes", alias="totalSize")
duration: StrictInt = Field(description="The duration of the request in seconds")
min_price_per_byte_per_second: StrictStr = Field(description="Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string", alias="minPricePerBytePerSecond")
total_collateral: StrictStr = Field(description="Total collateral (in amount of tokens) that can be used for matching requests", alias="totalCollateral")
__properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPricePerBytePerSecond", "totalCollateral"]
total_size: StrictStr = Field(description="Total size of availability's storage in bytes as decimal string", alias="totalSize")
duration: StrictStr = Field(description="The duration of the request in seconds as decimal string")
min_price: StrictStr = Field(description="Minimal price paid (in amount of tokens) for the whole hosted request's slot for the request's duration as decimal string", alias="minPrice")
max_collateral: StrictStr = Field(description="Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string", alias="maxCollateral")
__properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPrice", "maxCollateral"]
model_config = ConfigDict(
populate_by_name=True,
@ -88,8 +88,8 @@ class SalesAvailabilityCREATE(BaseModel):
"id": obj.get("id"),
"totalSize": obj.get("totalSize"),
"duration": obj.get("duration"),
"minPricePerBytePerSecond": obj.get("minPricePerBytePerSecond"),
"totalCollateral": obj.get("totalCollateral")
"minPrice": obj.get("minPrice"),
"maxCollateral": obj.get("maxCollateral")
})
return _obj

View File

@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
@ -27,16 +27,13 @@ class SalesAvailabilityREAD(BaseModel):
"""
SalesAvailabilityREAD
""" # noqa: E501
total_size: StrictInt = Field(description="Total size of availability's storage in bytes", alias="totalSize")
duration: StrictInt = Field(description="The duration of the request in seconds")
min_price_per_byte_per_second: StrictStr = Field(description="Minimal price per byte per second paid (in amount of tokens) for the hosted request's slot for the request's duration as decimal string", alias="minPricePerBytePerSecond")
total_collateral: StrictStr = Field(description="Total collateral (in amount of tokens) that can be used for matching requests", alias="totalCollateral")
enabled: Optional[StrictBool] = Field(default=True, description="Enable the ability to receive sales on this availability.")
until: Optional[StrictInt] = Field(default=0, description="Specifies the latest timestamp, after which the availability will no longer host any slots. If set to 0, there will be no restrictions.")
id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.")
free_size: StrictInt = Field(description="Unused size of availability's storage in bytes as decimal string", alias="freeSize")
total_remaining_collateral: StrictStr = Field(description="Total collateral effective (in amount of tokens) that can be used for matching requests", alias="totalRemainingCollateral")
__properties: ClassVar[List[str]] = ["totalSize", "duration", "minPricePerBytePerSecond", "totalCollateral", "enabled", "until", "id", "freeSize", "totalRemainingCollateral"]
id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.")
total_size: Optional[StrictStr] = Field(default=None, description="Total size of availability's storage in bytes as decimal string", alias="totalSize")
duration: Optional[StrictStr] = Field(default=None, description="The duration of the request in seconds as decimal string")
min_price: Optional[StrictStr] = Field(default=None, description="Minimal price paid (in amount of tokens) for the whole hosted request's slot for the request's duration as decimal string", alias="minPrice")
max_collateral: Optional[StrictStr] = Field(default=None, description="Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string", alias="maxCollateral")
free_size: Optional[StrictStr] = Field(default=None, description="Unused size of availability's storage in bytes as decimal string", alias="freeSize")
__properties: ClassVar[List[str]] = ["id", "totalSize", "duration", "minPrice", "maxCollateral", "freeSize"]
model_config = ConfigDict(
populate_by_name=True,
@ -68,12 +65,8 @@ class SalesAvailabilityREAD(BaseModel):
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"free_size",
"total_remaining_collateral",
])
_dict = self.model_dump(
@ -93,15 +86,12 @@ class SalesAvailabilityREAD(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"id": obj.get("id"),
"totalSize": obj.get("totalSize"),
"duration": obj.get("duration"),
"minPricePerBytePerSecond": obj.get("minPricePerBytePerSecond"),
"totalCollateral": obj.get("totalCollateral"),
"enabled": obj.get("enabled") if obj.get("enabled") is not None else True,
"until": obj.get("until") if obj.get("until") is not None else 0,
"id": obj.get("id"),
"freeSize": obj.get("freeSize"),
"totalRemainingCollateral": obj.get("totalRemainingCollateral")
"minPrice": obj.get("minPrice"),
"maxCollateral": obj.get("maxCollateral"),
"freeSize": obj.get("freeSize")
})
return _obj

View File

@ -17,8 +17,8 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from codex_api_client.models.storage_request import StorageRequest
from typing import Optional, Set
from typing_extensions import Self
@ -27,9 +27,9 @@ class Slot(BaseModel):
"""
Slot
""" # noqa: E501
id: StrictStr = Field(description="Keccak hash of the abi encoded tuple (RequestId, slot index)")
request: StorageRequest
slot_index: StrictInt = Field(description="Slot Index number", alias="slotIndex")
id: Optional[StrictStr] = Field(default=None, description="Keccak hash of the abi encoded tuple (RequestId, slot index)")
request: Optional[StorageRequest] = None
slot_index: Optional[StrictStr] = Field(default=None, description="Slot Index as decimal string", alias="slotIndex")
__properties: ClassVar[List[str]] = ["id", "request", "slotIndex"]
model_config = ConfigDict(

View File

@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from codex_api_client.models.reservation import Reservation
@ -29,16 +29,20 @@ class SlotAgent(BaseModel):
"""
SlotAgent
""" # noqa: E501
slot_index: StrictInt = Field(description="Slot Index number", alias="slotIndex")
request_id: Annotated[str, Field(min_length=66, strict=True, max_length=66)] = Field(description="32bits identifier encoded in hex-decimal string.", alias="requestId")
id: Optional[StrictStr] = Field(default=None, description="Keccak hash of the abi encoded tuple (RequestId, slot index)")
slot_index: Optional[StrictStr] = Field(default=None, description="Slot Index as decimal string", alias="slotIndex")
request_id: Optional[Annotated[str, Field(min_length=66, strict=True, max_length=66)]] = Field(default=None, description="32bits identifier encoded in hex-decimal string.", alias="requestId")
request: Optional[StorageRequest] = None
reservation: Optional[Reservation] = None
state: StrictStr = Field(description="Description of the slot's")
__properties: ClassVar[List[str]] = ["slotIndex", "requestId", "request", "reservation", "state"]
state: Optional[StrictStr] = Field(default=None, description="Description of the slot's")
__properties: ClassVar[List[str]] = ["id", "slotIndex", "requestId", "request", "reservation", "state"]
@field_validator('state')
def state_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value
if value not in set(['SaleCancelled', 'SaleDownloading', 'SaleErrored', 'SaleFailed', 'SaleFilled', 'SaleFilling', 'SaleFinished', 'SaleIgnored', 'SaleInitialProving', 'SalePayout', 'SalePreparing', 'SaleProving', 'SaleUnknown']):
raise ValueError("must be one of enum values ('SaleCancelled', 'SaleDownloading', 'SaleErrored', 'SaleFailed', 'SaleFilled', 'SaleFilling', 'SaleFinished', 'SaleIgnored', 'SaleInitialProving', 'SalePayout', 'SalePreparing', 'SaleProving', 'SaleUnknown')")
return value
@ -100,6 +104,7 @@ class SlotAgent(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"id": obj.get("id"),
"slotIndex": obj.get("slotIndex"),
"requestId": obj.get("requestId"),
"request": StorageRequest.from_dict(obj["request"]) if obj.get("request") is not None else None,

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@ -26,10 +26,10 @@ class Space(BaseModel):
"""
Space
""" # noqa: E501
total_blocks: StrictInt = Field(description="Number of blocks stored by the node", alias="totalBlocks")
quota_max_bytes: StrictInt = Field(description="Maximum storage space (in bytes) available for the node in Codex's local repository.", alias="quotaMaxBytes")
quota_used_bytes: StrictInt = Field(description="Amount of storage space (in bytes) currently used for storing files in Codex's local repository.", alias="quotaUsedBytes")
quota_reserved_bytes: StrictInt = Field(description="Amount of storage reserved (in bytes) in the Codex's local repository for future use when storage requests will be picked up and hosted by the node using node's availabilities. This does not include the storage currently in use.", alias="quotaReservedBytes")
total_blocks: Optional[StrictInt] = Field(default=None, description="Number of blocks stored by the node", alias="totalBlocks")
quota_max_bytes: Optional[StrictInt] = Field(default=None, description="Maximum storage space (in bytes) available for the node in Codex's local repository.", alias="quotaMaxBytes")
quota_used_bytes: Optional[StrictInt] = Field(default=None, description="Amount of storage space (in bytes) currently used for storing files in Codex's local repository.", alias="quotaUsedBytes")
quota_reserved_bytes: Optional[StrictInt] = Field(default=None, description="Amount of storage reserved (in bytes) in the Codex's local repository for future use when storage requests will be picked up and hosted by the node using node's availabilities. This does not include the storage currently in use.", alias="quotaReservedBytes")
__properties: ClassVar[List[str]] = ["totalBlocks", "quotaMaxBytes", "quotaUsedBytes", "quotaReservedBytes"]
model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@ -26,7 +26,7 @@ class SPRRead(BaseModel):
"""
SPRRead
""" # noqa: E501
spr: StrictStr = Field(description="Signed Peer Record (libp2p)")
spr: Optional[StrictStr] = Field(default=None, description="Signed Peer Record (libp2p)")
__properties: ClassVar[List[str]] = ["spr"]
model_config = ConfigDict(

View File

@ -18,7 +18,7 @@ import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@ -26,14 +26,13 @@ class StorageAsk(BaseModel):
"""
StorageAsk
""" # noqa: E501
slots: StrictInt = Field(description="Number of slots (eq. hosts) that the Request want to have the content spread over")
slot_size: StrictInt = Field(description="Amount of storage per slot in bytes", alias="slotSize")
duration: StrictInt = Field(description="The duration of the request in seconds")
proof_probability: StrictStr = Field(description="How often storage proofs are required as decimal string", alias="proofProbability")
price_per_byte_per_second: StrictStr = Field(description="The amount of tokens paid per byte per second per slot to hosts the client is willing to pay", alias="pricePerBytePerSecond")
collateral_per_byte: StrictStr = Field(description="Number as decimal string that represents how much collateral per byte is asked from hosts that wants to fill a slots", alias="collateralPerByte")
max_slot_loss: StrictInt = Field(description="Max slots that can be lost without data considered to be lost", alias="maxSlotLoss")
__properties: ClassVar[List[str]] = ["slots", "slotSize", "duration", "proofProbability", "pricePerBytePerSecond", "collateralPerByte", "maxSlotLoss"]
slots: Optional[StrictInt] = Field(default=None, description="Number of slots (eq. hosts) that the Request want to have the content spread over")
slot_size: Optional[StrictStr] = Field(default=None, description="Amount of storage per slot (in bytes) as decimal string", alias="slotSize")
duration: Optional[StrictStr] = Field(default=None, description="The duration of the request in seconds as decimal string")
proof_probability: Optional[StrictStr] = Field(default=None, description="How often storage proofs are required as decimal string", alias="proofProbability")
reward: StrictStr = Field(description="The maximum amount of tokens paid per second per slot to hosts the client is willing to pay")
max_slot_loss: Optional[StrictInt] = Field(default=None, description="Max slots that can be lost without data considered to be lost", alias="maxSlotLoss")
__properties: ClassVar[List[str]] = ["slots", "slotSize", "duration", "proofProbability", "reward", "maxSlotLoss"]
model_config = ConfigDict(
populate_by_name=True,
@ -90,8 +89,7 @@ class StorageAsk(BaseModel):
"slotSize": obj.get("slotSize"),
"duration": obj.get("duration"),
"proofProbability": obj.get("proofProbability"),
"pricePerBytePerSecond": obj.get("pricePerBytePerSecond"),
"collateralPerByte": obj.get("collateralPerByte"),
"reward": obj.get("reward"),
"maxSlotLoss": obj.get("maxSlotLoss")
})
return _obj

View File

@ -17,8 +17,8 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from codex_api_client.models.content import Content
from codex_api_client.models.storage_ask import StorageAsk
from typing import Optional, Set
@ -28,12 +28,12 @@ class StorageRequest(BaseModel):
"""
StorageRequest
""" # noqa: E501
id: StrictStr = Field(description="Request ID")
client: StrictStr = Field(description="Address of Ethereum address")
ask: StorageAsk
content: Content
expiry: StrictInt = Field(description="A timestamp as seconds since unix epoch at which this request expires if the Request does not find requested amount of nodes to host the data.")
nonce: StrictStr = Field(description="Random data")
id: Optional[StrictStr] = Field(default=None, description="Request ID")
client: Optional[StrictStr] = Field(default=None, description="Address of Ethereum address")
ask: Optional[StorageAsk] = None
content: Optional[Content] = None
expiry: Optional[StrictStr] = Field(default='10 minutes', description="A timestamp as seconds since unix epoch at which this request expires if the Request does not find requested amount of nodes to host the data.")
nonce: Optional[StrictStr] = Field(default=None, description="Random data")
__properties: ClassVar[List[str]] = ["id", "client", "ask", "content", "expiry", "nonce"]
model_config = ConfigDict(
@ -97,7 +97,7 @@ class StorageRequest(BaseModel):
"client": obj.get("client"),
"ask": StorageAsk.from_dict(obj["ask"]) if obj.get("ask") is not None else None,
"content": Content.from_dict(obj["content"]) if obj.get("content") is not None else None,
"expiry": obj.get("expiry"),
"expiry": obj.get("expiry") if obj.get("expiry") is not None else '10 minutes',
"nonce": obj.get("nonce")
})
return _obj

View File

@ -19,7 +19,6 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@ -27,14 +26,14 @@ class StorageRequestCreation(BaseModel):
"""
StorageRequestCreation
""" # noqa: E501
duration: StrictInt = Field(description="The duration of the request in seconds")
price_per_byte_per_second: StrictStr = Field(description="The amount of tokens paid per byte per second per slot to hosts the client is willing to pay", alias="pricePerBytePerSecond")
duration: StrictStr = Field(description="The duration of the request in seconds as decimal string")
reward: StrictStr = Field(description="The maximum amount of tokens paid per second per slot to hosts the client is willing to pay")
proof_probability: StrictStr = Field(description="How often storage proofs are required as decimal string", alias="proofProbability")
nodes: Optional[Annotated[int, Field(strict=True, ge=3)]] = Field(default=3, description="Minimal number of nodes the content should be stored on")
tolerance: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Additional number of nodes on top of the `nodes` property that can be lost before pronouncing the content lost")
collateral_per_byte: StrictStr = Field(description="Number as decimal string that represents how much collateral per byte is asked from hosts that wants to fill a slots", alias="collateralPerByte")
expiry: StrictInt = Field(description="Number that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request's duration itself.")
__properties: ClassVar[List[str]] = ["duration", "pricePerBytePerSecond", "proofProbability", "nodes", "tolerance", "collateralPerByte", "expiry"]
nodes: Optional[StrictInt] = Field(default=1, description="Minimal number of nodes the content should be stored on")
tolerance: Optional[StrictInt] = Field(default=0, description="Additional number of nodes on top of the `nodes` property that can be lost before pronouncing the content lost")
collateral: StrictStr = Field(description="Number as decimal string that represents how much collateral is asked from hosts that wants to fill a slots")
expiry: StrictStr = Field(description="Number as decimal string that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request's duration itself.")
__properties: ClassVar[List[str]] = ["duration", "reward", "proofProbability", "nodes", "tolerance", "collateral", "expiry"]
model_config = ConfigDict(
populate_by_name=True,
@ -88,11 +87,11 @@ class StorageRequestCreation(BaseModel):
_obj = cls.model_validate({
"duration": obj.get("duration"),
"pricePerBytePerSecond": obj.get("pricePerBytePerSecond"),
"reward": obj.get("reward"),
"proofProbability": obj.get("proofProbability"),
"nodes": obj.get("nodes") if obj.get("nodes") is not None else 3,
"tolerance": obj.get("tolerance") if obj.get("tolerance") is not None else 1,
"collateralPerByte": obj.get("collateralPerByte"),
"nodes": obj.get("nodes") if obj.get("nodes") is not None else 1,
"tolerance": obj.get("tolerance") if obj.get("tolerance") is not None else 0,
"collateral": obj.get("collateral"),
"expiry": obj.get("expiry")
})
return _obj

View File

@ -76,7 +76,6 @@ class RESTClientObject:
"ca_certs": configuration.ssl_ca_cert,
"cert_file": configuration.cert_file,
"key_file": configuration.key_file,
"ca_cert_data": configuration.ca_cert_data,
}
if configuration.assert_hostname is not None:
pool_args['assert_hostname'] = (

View File

@ -7,7 +7,6 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**version** | **str** | | [optional]
**revision** | **str** | | [optional]
**contracts** | **str** | | [optional]
## Example

View File

@ -6,7 +6,7 @@ Parameters specifying the content
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid |
**cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid | [optional]
## Example

View File

@ -4,7 +4,6 @@ All URIs are relative to *http://localhost:8080/api/codex/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**delete_local**](DataApi.md#delete_local) | **DELETE** /data/{cid} | Deletes either a single block or an entire dataset from the local node.
[**download_local**](DataApi.md#download_local) | **GET** /data/{cid} | Download a file from the local node in a streaming manner. If the file is not available locally, a 404 is returned.
[**download_network**](DataApi.md#download_network) | **POST** /data/{cid}/network | Download a file from the network to the local node if it&#39;s not available locally. Note: Download is performed async. Call can return before download is completed.
[**download_network_manifest**](DataApi.md#download_network_manifest) | **GET** /data/{cid}/network/manifest | Download only the dataset manifest from the network to the local node if it&#39;s not available locally.
@ -14,71 +13,6 @@ Method | HTTP request | Description
[**upload**](DataApi.md#upload) | **POST** /data | Upload a file in a streaming manner. Once finished, the file is stored in the node and can be retrieved by any node in the network using the returned CID.
# **delete_local**
> delete_local(cid)
Deletes either a single block or an entire dataset from the local node.
### Example
```python
import codex_api_client
from codex_api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080/api/codex/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = codex_api_client.Configuration(
host = "http://localhost:8080/api/codex/v1"
)
# Enter a context with an instance of the API client
with codex_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = codex_api_client.DataApi(api_client)
cid = 'cid_example' # str | Block or dataset to be deleted.
try:
# Deletes either a single block or an entire dataset from the local node.
api_instance.delete_local(cid)
except Exception as e:
print("Exception when calling DataApi->delete_local: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**cid** | **str**| Block or dataset to be deleted. |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | Data was successfully deleted. | - |
**400** | Invalid CID is specified | - |
**500** | There was an error during deletion | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **download_local**
> bytearray download_local(cid)
@ -548,7 +482,6 @@ No authorization required
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | CID of uploaded file | - |
**422** | The mimetype of the filename is invalid | - |
**500** | Well it was bad-bad and the upload did not work out | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -5,8 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid |
**manifest** | [**ManifestItem**](ManifestItem.md) | |
**cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid | [optional]
**manifest** | [**ManifestItem**](ManifestItem.md) | | [optional]
## Example

View File

@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**content** | [**List[DataItem]**](DataItem.md) | |
**content** | [**List[DataItem]**](DataItem.md) | | [optional]
## Example

View File

@ -5,13 +5,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Peer Identity reference as specified at https://docs.libp2p.io/concepts/fundamentals/peers/ |
**addrs** | **List[str]** | |
**repo** | **str** | Path of the data repository where all nodes data are stored |
**spr** | **str** | Signed Peer Record (libp2p) |
**announce_addresses** | **List[str]** | |
**table** | [**PeersTable**](PeersTable.md) | |
**codex** | [**CodexVersion**](CodexVersion.md) | |
**id** | **str** | Peer Identity reference as specified at https://docs.libp2p.io/concepts/fundamentals/peers/ | [optional]
**addrs** | **List[str]** | | [optional]
**repo** | **str** | Path of the data repository where all nodes data are stored | [optional]
**spr** | **str** | Signed Peer Record (libp2p) | [optional]
**table** | [**PeersTable**](PeersTable.md) | | [optional]
**codex** | [**CodexVersion**](CodexVersion.md) | | [optional]
## Example

View File

@ -5,12 +5,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tree_cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid |
**dataset_size** | **int** | Length of original content in bytes |
**block_size** | **int** | Size of blocks |
**protected** | **bool** | Indicates if content is protected by erasure-coding |
**tree_cid** | **str** | Content Identifier as specified at https://github.com/multiformats/cid | [optional]
**dataset_size** | **int** | Length of original content in bytes | [optional]
**block_size** | **int** | Size of blocks | [optional]
**protected** | **bool** | Indicates if content is protected by erasure-coding | [optional]
**filename** | **str** | The original name of the uploaded content (optional) | [optional]
**mimetype** | **str** | The original mimetype of the uploaded content (optional) | [optional]
**uploaded_at** | **int** | The UTC upload timestamp in seconds | [optional]
## Example

View File

@ -81,7 +81,6 @@ No authorization required
|-------------|-------------|------------------|
**200** | Returns the Request ID as decimal string | - |
**400** | Invalid or missing Request ID | - |
**422** | The storage request parameters are not valid | - |
**404** | Request ID not found | - |
**503** | Persistence is not enabled | - |
@ -487,7 +486,7 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **offer_storage**
> SalesAvailabilityREAD offer_storage(sales_availability=sales_availability)
> SalesAvailabilityREAD offer_storage(sales_availability_create=sales_availability_create)
Offers storage for sale
@ -496,7 +495,7 @@ Offers storage for sale
```python
import codex_api_client
from codex_api_client.models.sales_availability import SalesAvailability
from codex_api_client.models.sales_availability_create import SalesAvailabilityCREATE
from codex_api_client.models.sales_availability_read import SalesAvailabilityREAD
from codex_api_client.rest import ApiException
from pprint import pprint
@ -512,11 +511,11 @@ configuration = codex_api_client.Configuration(
with codex_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = codex_api_client.MarketplaceApi(api_client)
sales_availability = codex_api_client.SalesAvailability() # SalesAvailability | (optional)
sales_availability_create = codex_api_client.SalesAvailabilityCREATE() # SalesAvailabilityCREATE | (optional)
try:
# Offers storage for sale
api_response = api_instance.offer_storage(sales_availability=sales_availability)
api_response = api_instance.offer_storage(sales_availability_create=sales_availability_create)
print("The response of MarketplaceApi->offer_storage:\n")
pprint(api_response)
except Exception as e:
@ -530,7 +529,7 @@ with codex_api_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**sales_availability** | [**SalesAvailability**](SalesAvailability.md)| | [optional]
**sales_availability_create** | [**SalesAvailabilityCREATE**](SalesAvailabilityCREATE.md)| | [optional]
### Return type
@ -551,7 +550,7 @@ No authorization required
|-------------|-------------|------------------|
**201** | Created storage availability | - |
**400** | Invalid data input | - |
**422** | Not enough node&#39;s storage quota available or the provided parameters did not pass validation | - |
**422** | Not enough node&#39;s storage quota available | - |
**500** | Error reserving availability | - |
**503** | Persistence is not enabled | - |
@ -562,9 +561,7 @@ No authorization required
Updates availability
The new parameters will be only considered for new requests.
Existing Requests linked to this Availability will continue as is.
The new parameters will be only considered for new requests. Existing Requests linked to this Availability will continue as is.
### Example
@ -626,7 +623,7 @@ No authorization required
**204** | Availability successfully updated | - |
**400** | Invalid data input | - |
**404** | Availability not found | - |
**422** | The provided parameters did not pass validation | - |
**422** | Not enough node&#39;s storage quota available | - |
**500** | Error reserving availability | - |
**503** | Persistence is not enabled | - |

View File

@ -5,11 +5,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**node_id** | **str** | |
**peer_id** | **str** | |
**record** | **str** | |
**address** | **str** | |
**seen** | **bool** | |
**node_id** | **str** | | [optional]
**peer_id** | **str** | | [optional]
**record** | **str** | | [optional]
**address** | **str** | | [optional]
**seen** | **bool** | | [optional]
## Example

View File

@ -14,9 +14,7 @@ Method | HTTP request | Description
Connect to a peer
If `addrs` param is supplied, it will be used to dial the peer, otherwise the `peerId` is used
to invoke peer discovery, if it succeeds the returned addresses will be used to dial.
If `addrs` param is supplied, it will be used to dial the peer, otherwise the `peerId` is used to invoke peer discovery, if it succeeds the returned addresses will be used to dial.
### Example
@ -130,7 +128,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: text/plain, application/json
- **Accept**: plain/text, application/json
### HTTP response details
@ -191,7 +189,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: text/plain, application/json
- **Accept**: plain/text, application/json
### HTTP response details

View File

@ -5,8 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**local_node** | [**Node**](Node.md) | |
**nodes** | [**List[Node]**](Node.md) | |
**local_node** | [**Node**](Node.md) | | [optional]
**nodes** | [**List[Node]**](Node.md) | | [optional]
## Example

View File

@ -5,10 +5,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**state** | **str** | Description of the Request&#39;s state |
**state** | **str** | Description of the Request&#39;s state | [optional]
**error** | **str** | If Request failed, then here is presented the error message | [optional]
**request** | [**StorageRequest**](StorageRequest.md) | | [optional]
**request_id** | **str** | 32bits identifier encoded in hex-decimal string. |
## Example

View File

@ -5,12 +5,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | 32bits identifier encoded in hex-decimal string. |
**availability_id** | **str** | 32bits identifier encoded in hex-decimal string. |
**size** | **int** | Size of the slot in bytes |
**request_id** | **str** | 32bits identifier encoded in hex-decimal string. |
**slot_index** | **int** | Slot Index number |
**valid_until** | **int** | Timestamp after which the reservation will no longer be valid. |
**id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional]
**availability_id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional]
**size** | **str** | Integer represented as decimal string | [optional]
**request_id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional]
**slot_index** | **str** | Slot Index as decimal string | [optional]
## Example

View File

@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**spr** | **str** | Signed Peer Record (libp2p) |
**spr** | **str** | Signed Peer Record (libp2p) | [optional]
## Example

View File

@ -5,12 +5,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total_size** | **int** | Total size of availability&#39;s storage in bytes |
**duration** | **int** | The duration of the request in seconds |
**min_price_per_byte_per_second** | **str** | Minimal price per byte per second paid (in amount of tokens) for the hosted request&#39;s slot for the request&#39;s duration as decimal string |
**total_collateral** | **str** | Total collateral (in amount of tokens) that can be used for matching requests |
**enabled** | **bool** | Enable the ability to receive sales on this availability. | [optional] [default to True]
**until** | **int** | Specifies the latest timestamp, after which the availability will no longer host any slots. If set to 0, there will be no restrictions. | [optional] [default to 0]
**id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional]
**total_size** | **str** | Total size of availability&#39;s storage in bytes as decimal string | [optional]
**duration** | **str** | The duration of the request in seconds as decimal string | [optional]
**min_price** | **str** | Minimal price paid (in amount of tokens) for the whole hosted request&#39;s slot for the request&#39;s duration as decimal string | [optional]
**max_collateral** | **str** | Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string | [optional]
## Example

View File

@ -6,10 +6,10 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional]
**total_size** | **int** | Total size of availability&#39;s storage in bytes |
**duration** | **int** | The duration of the request in seconds |
**min_price_per_byte_per_second** | **str** | Minimal price per byte per second paid (in amount of tokens) for the hosted request&#39;s slot for the request&#39;s duration as decimal string |
**total_collateral** | **str** | Total collateral (in amount of tokens) that can be used for matching requests |
**total_size** | **str** | Total size of availability&#39;s storage in bytes as decimal string |
**duration** | **str** | The duration of the request in seconds as decimal string |
**min_price** | **str** | Minimal price paid (in amount of tokens) for the whole hosted request&#39;s slot for the request&#39;s duration as decimal string |
**max_collateral** | **str** | Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string |
## Example

View File

@ -5,15 +5,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total_size** | **int** | Total size of availability&#39;s storage in bytes |
**duration** | **int** | The duration of the request in seconds |
**min_price_per_byte_per_second** | **str** | Minimal price per byte per second paid (in amount of tokens) for the hosted request&#39;s slot for the request&#39;s duration as decimal string |
**total_collateral** | **str** | Total collateral (in amount of tokens) that can be used for matching requests |
**enabled** | **bool** | Enable the ability to receive sales on this availability. | [optional] [default to True]
**until** | **int** | Specifies the latest timestamp, after which the availability will no longer host any slots. If set to 0, there will be no restrictions. | [optional] [default to 0]
**id** | **str** | 32bits identifier encoded in hex-decimal string. |
**free_size** | **int** | Unused size of availability&#39;s storage in bytes as decimal string | [readonly]
**total_remaining_collateral** | **str** | Total collateral effective (in amount of tokens) that can be used for matching requests | [readonly]
**id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional]
**total_size** | **str** | Total size of availability&#39;s storage in bytes as decimal string | [optional]
**duration** | **str** | The duration of the request in seconds as decimal string | [optional]
**min_price** | **str** | Minimal price paid (in amount of tokens) for the whole hosted request&#39;s slot for the request&#39;s duration as decimal string | [optional]
**max_collateral** | **str** | Maximum collateral user is willing to pay per filled Slot (in amount of tokens) as decimal string | [optional]
**free_size** | **str** | Unused size of availability&#39;s storage in bytes as decimal string | [optional]
## Example

View File

@ -5,9 +5,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Keccak hash of the abi encoded tuple (RequestId, slot index) |
**request** | [**StorageRequest**](StorageRequest.md) | |
**slot_index** | **int** | Slot Index number |
**id** | **str** | Keccak hash of the abi encoded tuple (RequestId, slot index) | [optional]
**request** | [**StorageRequest**](StorageRequest.md) | | [optional]
**slot_index** | **str** | Slot Index as decimal string | [optional]
## Example

View File

@ -5,11 +5,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**slot_index** | **int** | Slot Index number |
**request_id** | **str** | 32bits identifier encoded in hex-decimal string. |
**id** | **str** | Keccak hash of the abi encoded tuple (RequestId, slot index) | [optional]
**slot_index** | **str** | Slot Index as decimal string | [optional]
**request_id** | **str** | 32bits identifier encoded in hex-decimal string. | [optional]
**request** | [**StorageRequest**](StorageRequest.md) | | [optional]
**reservation** | [**Reservation**](Reservation.md) | | [optional]
**state** | **str** | Description of the slot&#39;s |
**state** | **str** | Description of the slot&#39;s | [optional]
## Example

View File

@ -5,10 +5,10 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total_blocks** | **int** | Number of blocks stored by the node |
**quota_max_bytes** | **int** | Maximum storage space (in bytes) available for the node in Codex&#39;s local repository. |
**quota_used_bytes** | **int** | Amount of storage space (in bytes) currently used for storing files in Codex&#39;s local repository. |
**quota_reserved_bytes** | **int** | Amount of storage reserved (in bytes) in the Codex&#39;s local repository for future use when storage requests will be picked up and hosted by the node using node&#39;s availabilities. This does not include the storage currently in use. |
**total_blocks** | **int** | Number of blocks stored by the node | [optional]
**quota_max_bytes** | **int** | Maximum storage space (in bytes) available for the node in Codex&#39;s local repository. | [optional]
**quota_used_bytes** | **int** | Amount of storage space (in bytes) currently used for storing files in Codex&#39;s local repository. | [optional]
**quota_reserved_bytes** | **int** | Amount of storage reserved (in bytes) in the Codex&#39;s local repository for future use when storage requests will be picked up and hosted by the node using node&#39;s availabilities. This does not include the storage currently in use. | [optional]
## Example

View File

@ -5,13 +5,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**slots** | **int** | Number of slots (eq. hosts) that the Request want to have the content spread over |
**slot_size** | **int** | Amount of storage per slot in bytes |
**duration** | **int** | The duration of the request in seconds |
**proof_probability** | **str** | How often storage proofs are required as decimal string |
**price_per_byte_per_second** | **str** | The amount of tokens paid per byte per second per slot to hosts the client is willing to pay |
**collateral_per_byte** | **str** | Number as decimal string that represents how much collateral per byte is asked from hosts that wants to fill a slots |
**max_slot_loss** | **int** | Max slots that can be lost without data considered to be lost |
**slots** | **int** | Number of slots (eq. hosts) that the Request want to have the content spread over | [optional]
**slot_size** | **str** | Amount of storage per slot (in bytes) as decimal string | [optional]
**duration** | **str** | The duration of the request in seconds as decimal string | [optional]
**proof_probability** | **str** | How often storage proofs are required as decimal string | [optional]
**reward** | **str** | The maximum amount of tokens paid per second per slot to hosts the client is willing to pay |
**max_slot_loss** | **int** | Max slots that can be lost without data considered to be lost | [optional]
## Example

View File

@ -5,12 +5,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Request ID |
**client** | **str** | Address of Ethereum address |
**ask** | [**StorageAsk**](StorageAsk.md) | |
**content** | [**Content**](Content.md) | |
**expiry** | **int** | A timestamp as seconds since unix epoch at which this request expires if the Request does not find requested amount of nodes to host the data. |
**nonce** | **str** | Random data |
**id** | **str** | Request ID | [optional]
**client** | **str** | Address of Ethereum address | [optional]
**ask** | [**StorageAsk**](StorageAsk.md) | | [optional]
**content** | [**Content**](Content.md) | | [optional]
**expiry** | **str** | A timestamp as seconds since unix epoch at which this request expires if the Request does not find requested amount of nodes to host the data. | [optional] [default to '10 minutes']
**nonce** | **str** | Random data | [optional]
## Example

View File

@ -5,13 +5,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**duration** | **int** | The duration of the request in seconds |
**price_per_byte_per_second** | **str** | The amount of tokens paid per byte per second per slot to hosts the client is willing to pay |
**duration** | **str** | The duration of the request in seconds as decimal string |
**reward** | **str** | The maximum amount of tokens paid per second per slot to hosts the client is willing to pay |
**proof_probability** | **str** | How often storage proofs are required as decimal string |
**nodes** | **int** | Minimal number of nodes the content should be stored on | [optional] [default to 3]
**tolerance** | **int** | Additional number of nodes on top of the &#x60;nodes&#x60; property that can be lost before pronouncing the content lost | [optional] [default to 1]
**collateral_per_byte** | **str** | Number as decimal string that represents how much collateral per byte is asked from hosts that wants to fill a slots |
**expiry** | **int** | Number that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request&#39;s duration itself. |
**nodes** | **int** | Minimal number of nodes the content should be stored on | [optional] [default to 1]
**tolerance** | **int** | Additional number of nodes on top of the &#x60;nodes&#x60; property that can be lost before pronouncing the content lost | [optional] [default to 0]
**collateral** | **str** | Number as decimal string that represents how much collateral is asked from hosts that wants to fill a slots |
**expiry** | **str** | Number as decimal string that represents expiry threshold in seconds from when the Request is submitted. When the threshold is reached and the Request does not find requested amount of nodes to host the data, the Request is voided. The number of seconds can not be higher then the Request&#39;s duration itself. |
## Example

View File

@ -2,6 +2,6 @@
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.12.0"
"version": "7.10.0"
}
}

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "codex_api_client"
version = "0.4.0"
version = "0.1.0"
description = "Codex API"
authors = ["OpenAPI Generator Community <team@openapitools.org>"]
license = "NoLicense"
@ -12,7 +12,7 @@ include = ["codex_api_client/py.typed"]
[tool.poetry.dependencies]
python = "^3.8"
urllib3 = ">= 1.25.3, < 3.0.0"
urllib3 = ">= 1.25.3 < 3.0.0"
python-dateutil = ">= 2.8.2"
pydantic = ">= 2"
typing-extensions = ">= 4.7.1"

View File

@ -21,7 +21,7 @@ from setuptools import setup, find_packages # noqa: H301
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "codex-api-client"
VERSION = "0.4.0"
VERSION = "0.1.0"
PYTHON_REQUIRES = ">= 3.8"
REQUIRES = [
"urllib3 >= 1.25.3, < 3.0.0",
@ -46,4 +46,4 @@ setup(
List of endpoints and interfaces available to Codex API users
""", # noqa: E501
package_data={"codex_api_client": ["py.typed"]},
)
)