Skip to main content

masterai oss

Project description

masterai-oss

基于boto3封装, 返回值更加清晰

支持

原生函数

  1. copy_object
  2. delete_object
  3. get_object
  4. head_object
  5. put_object
  6. list_objects
  7. list_objects_v2
  8. filter
  9. all
  10. download_file
  11. download_fileobj
  12. upload_file
  13. upload_fileobj

扩展函数

  1. check_object_exist
  2. upload_if_not_exist

使用方式

from masterai_oss import S3Client, PutObjectResponse, HeadObjectResponse

client = S3Client(
    access_key="your access_key",
    secret_key="your secret_key",
    bucket_name="your bucket_name",
    endpoint="your endpoint",
)

key = "path/of/obj.suffix"
put_response: PutObjectResponse = client.put_object(
    key=key,
    body=b"file content",
)

head_response: HeadObjectResponse = client.head_object(
    key=key
)
print(head_response.ContentLength)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

masterai-oss-2023.8.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

masterai_oss-2023.8.1-py2.py3-none-any.whl (8.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file masterai-oss-2023.8.1.tar.gz.

File metadata

  • Download URL: masterai-oss-2023.8.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for masterai-oss-2023.8.1.tar.gz
Algorithm Hash digest
SHA256 f8df36bb43b0d7cd7a2ae1fdfb2fd204130e1100be97f8c7f712417e70b51da5
MD5 676cbec41df70e199d802e5c0631b9f8
BLAKE2b-256 ae9bc2f84a1b5810893e408f24cdfbb996f60246ce00d4122d77baf63721cc73

See more details on using hashes here.

File details

Details for the file masterai_oss-2023.8.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for masterai_oss-2023.8.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 746c1c0b007fa0f129aa6a829dd4c5014e474e30649f21bcd8d89ff5d6438170
MD5 a44e1dd6e1c775a964f83cdd9dc8c9f7
BLAKE2b-256 181fb95686ba5f1bb9b770673af1eef179a8cc7820bcee8aac7a90d3d2d3ac06

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page