Openfiles Python SDK
A Python SDK for interacting with the Openfiles API.
Installation
pip install openfiles
Usage
from openfiles import OpenfilesClient
# Method 1: Initialize the client with your API token
client = OpenfilesClient(api_token="your_api_token")
# Method 2: Initialize using OPENFILES_API_TOKEN environment variable
# export OPENFILES_API_TOKEN="your_api_token"
client = OpenfilesClient()
# Upload a file
response = client.upload_file(
file_path="test/file.txt", description="My file description"
)
file_bag_id = response.bag_id
print(f"File uploaded with bag_id: {file_bag_id}")
# Get user information
user_info = client.get_user_info()
print(f"Space left: {user_info.space_left} / {user_info.capacity}")
# List user files
files = client.get_user_files_list()
for file in files:
print(f"File: {file.filename}, Size: {file.size}, Bag ID: {file.bag_id}")
# Download a file
client.download_file(bag_id=file_bag_id, destination="test/file_copy.txt")
# Delete a file
client.delete_file(bag_id=file_bag_id)
Features
- Upload files
- Download files
- Delete files
- Get user information
- List user files
License
Metadata
Release files for openfiles 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openfiles-1.1.1.tar.gz | 6.3 kB | Without provenance | Details for openfiles-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openfiles-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for openfiles-1.1.1-py3-none-any.whl |
Total release size: 13.4 kB
Release files / openfiles-1.1.1.tar.gz
| Download URL | openfiles-1.1.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3971b35a4ecb9c162db5f192cfdc57c475c396c6f05e0048a354ce1f6c466f5
|
|
BLAKE2b-256 checksum How to use checksums |
089ad1bc49252e8f12d1f5d38479c7445865d963e881b25f9a6a4040e7b29911
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / openfiles-1.1.1-py3-none-any.whl
| Download URL | openfiles-1.1.1-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b03ce5c04a5c6435193346edab16a5ee9347d85fec46d7314c2fdfd471f3f455
|
|
BLAKE2b-256 checksum How to use checksums |
3ba9aff83d2e251b64ca516bac8142bf663e9fa30eead2b0dfad518a81d84eb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for openfiles 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.