You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 years ago | |
---|---|---|
.. | ||
.github/workflows | 2 years ago | |
.openapi-generator | 2 years ago | |
docs | 2 years ago | |
openapi_client | 2 years ago | |
test | 2 years ago | |
.gitignore | 2 years ago | |
.gitlab-ci.yml | 2 years ago | |
.openapi-generator-ignore | 2 years ago | |
.travis.yml | 2 years ago | |
README.md | 2 years ago | |
git_push.sh | 2 years ago | |
requirements.txt | 2 years ago | |
setup.cfg | 2 years ago | |
setup.py | 2 years ago | |
test-requirements.txt | 2 years ago | |
tox.ini | 2 years ago |
README.md
openapi-client
The Seaweedfs Master Server API allows you to store blobs
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 3.43.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonNextgenClientCodegen
Requirements.
Python 3.7+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import openapi_client
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import openapi_client
Getting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://127.0.0.1:9333
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://127.0.0.1:9333"
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.DefaultApi(api_client)
count = None # object | how many file ids to assign. Use <fid>_1, <fid>_2 for the assigned additional file ids. e.g. 3,01637037d6_1, 3,01637037d6_2 (optional)
collection = None # object | required collection name (optional)
data_center = None # object | preferred data center (optional)
rack = None # object | preferred rack (optional)
data_node = None # object | preferred volume server, e.g. 127.0.0.1:8080 (optional)
disk = None # object | If you have disks labelled, this must be supplied to specify the disk type to allocate on. (optional)
replication = None # object | replica placement strategy (optional)
ttl = None # object | file expiration time limit, example: 3m for 3 minutes. units: m-minute, h-hour, d-day, w-week, M-month, y-year (optional)
preallocate = None # object | If no matching volumes, pre-allocate this number of bytes on disk for new volumes. (optional)
memory_map_max_size_mb = None # object | Only implemented for windows. Use memory mapped files with specified size for new volumes. (optional)
writable_volume_count = None # object | If no matching volumes, create specified number of new volumes. (optional)
try:
# Assign a file key
api_response = api_instance.dir_assign(count=count, collection=collection, data_center=data_center, rack=rack, data_node=data_node, disk=disk, replication=replication, ttl=ttl, preallocate=preallocate, memory_map_max_size_mb=memory_map_max_size_mb, writable_volume_count=writable_volume_count)
print("The response of DefaultApi->dir_assign:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->dir_assign: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://127.0.0.1:9333
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | dir_assign | GET /dir/assign | Assign a file key |
DefaultApi | dir_lookup | GET /dir/lookup | Lookup volume |
Documentation For Models
Documentation For Authorization
All endpoints do not require authorization.