A package for managing robot simulation assets
Project description
FourierAssets
A powerful command-line tool and Python SDK for managing robot simulation assets stored in S3-compatible object storage.
Features
- 🚀 Easy S3 Integration: Compatible with AWS S3, MinIO, Alibaba Cloud OSS, and other S3-compatible services
- 📦 Intelligent Caching: Smart local caching with automatic path hierarchy management
- 🔄 Complete Asset Management: Upload, download, list, and remove files and directories
- 🌳 Tree-style Browsing: Recursive directory listing with detailed file information
- ⚙️ Configuration Management: Built-in credential and endpoint management
- 🎯 Auto-completion: Bash completion for all commands and options
- 📚 Dual Interface: Both CLI and Python SDK available
Installation
# Production installation
pip install fourierassets -i https://nexus.fftaicorp.com/repository/pypi/simple
# Development installation
git clone <repository>
cd fourierassets
make install-dev
Quick Start
-
Test your connection (optional for download-only usage):
fourierassets test
-
Download assets (works without configuration):
fourierassets download s3://bucket/path/to/asset
-
Configure for upload/management (required for upload, list, remove):
fourierassets config set-credentials ACCESS_KEY SECRET_KEY --endpoint-url https://your-s3-endpoint.com
CLI Usage
Basic Commands
# Download assets
fourierassets download s3://bucket/models/robot.urdf
fourierassets download s3://bucket/simulation/assets/ --recursive
# Upload assets (requires configuration)
fourierassets upload ./robot.urdf s3://bucket/models/robot.urdf
fourierassets upload ./assets/ s3://bucket/simulation/assets/
# List objects (requires configuration)
fourierassets ls s3://bucket/
fourierassets ls s3://bucket/path/ --recursive --details
# Remove objects (requires configuration)
fourierassets rm s3://bucket/old-file.txt
fourierassets rm s3://bucket/old-directory/ --recursive --force
Configuration
# Set credentials
fourierassets config set-credentials ACCESS_KEY SECRET_KEY --endpoint-url https://s3.example.com
# For Alibaba Cloud OSS
fourierassets config set-credentials LTAI_KEY SECRET --endpoint-url https://oss-cn-region.aliyuncs.com
# Show current configuration
fourierassets config show
# Test connection
fourierassets test --bucket your-bucket-name
Advanced Options
# Verbose output for debugging
fourierassets download s3://bucket/path/ --verbose
# Custom cache directory
fourierassets download s3://bucket/path/ --cache-dir ~/custom-cache
# Force operations without confirmation
fourierassets rm s3://bucket/path/ --recursive --force
# Clear cache
fourierassets clear-cache
Python SDK Usage
AssetDownloader
from fourierassets.downloader import AssetDownloader
# Download with default settings
downloader = AssetDownloader()
local_path = downloader.download("s3://bucket/models/robot.urdf")
print(f"Downloaded to: {local_path}")
# Download with custom cache and endpoint
downloader = AssetDownloader(
cache_dir="~/custom-cache",
endpoint_url="https://s3.example.com",
verbose=True
)
local_path = downloader.download("s3://bucket/simulation/assets/")
AssetUploader
from fourierassets.uploader import AssetUploader
# Upload single file
uploader = AssetUploader(endpoint_url="https://s3.example.com", verbose=True)
success = uploader.upload("./robot.urdf", "s3://bucket/models/robot.urdf")
# Upload directory
success = uploader.upload("./assets/", "s3://bucket/simulation/assets/")
AssetLister
from fourierassets.lister import AssetLister
# List bucket contents
lister = AssetLister(endpoint_url="https://s3.example.com")
lister.ls("s3://bucket/", recursive=True, show_details=True)
AssetRemover
from fourierassets.remover import AssetRemover
# Remove assets
remover = AssetRemover(endpoint_url="https://s3.example.com", verbose=True)
success = remover.rm(
["s3://bucket/old-file.txt", "s3://bucket/old-directory/"],
recursive=True,
force=True
)
Supported Storage Services
Alibaba Cloud OSS
fourierassets config set-credentials LTAI_KEY SECRET --endpoint-url https://oss-cn-wulanchabu.aliyuncs.com
AWS S3
fourierassets config set-credentials AKIA_KEY SECRET --endpoint-url https://s3.amazonaws.com
# Or region-specific: https://s3.us-west-2.amazonaws.com
MinIO
fourierassets config set-credentials minioadmin minioadmin --endpoint-url http://localhost:9000
Development
# Setup development environment
make install-dev
make install-hooks
# Code formatting and linting
make format
make lint
# Run tests
./tests/test_cli.sh
Troubleshooting
Connection Issues
# Test your connection
fourierassets test
# Check configuration
fourierassets config show
# Verify permissions
fourierassets check-permissions
Common Issues
- Download doesn't work: Check S3 URL format (
s3://bucket/path) - Upload/list fails: Ensure credentials are configured with
fourierassets config set-credentials - Permission denied: Verify your access key has required permissions
- Bucket not found: Check bucket name and endpoint URL region
Error Messages
"Invalid S3 URL": Use formats3://bucket/path"Access denied": Check credentials and bucket permissions"Bucket does not exist": Verify bucket name and endpoint region"API port error": Use API endpoint, not web console URL
Configuration File
Configuration is stored in ~/.fourierassets/config.json:
{
"s3": {
"access_key": "your-access-key",
"secret_key": "your-secret-key",
"endpoint_url": "https://your-s3-endpoint.com"
}
}
License
Copyright (C) 2015-2025 Fourier Intelligence Group Limited. All rights reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fourierassets-0.1.4-py3-none-any.whl.
File metadata
- Download URL: fourierassets-0.1.4-py3-none-any.whl
- Upload date:
- Size: 32.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fea9ba4099659bb7c249ab6be468be6eeb7de0eae965ec512be342b25325a94d
|
|
| MD5 |
f0412d11e228afb5eceb02d75074da87
|
|
| BLAKE2b-256 |
9221065075f7fd9f151b6ea9066000379da31fcafcd72a3ef499b3a0a8d23eac
|