Python SDK for AMAZ3D - Powered By Adapta Studio
Project description
Introduction
amaz3dpy is a Python SDK to interact with Amaz3d Web APIs. This SDK is built by three main component:
Object primitives for dealing with Authentication, Projects and Optimizations
A simple Client that simplifies interaction with Web APIs providing authentication, projects handling (visualization, creation, etc.), optimizations handling (creation and download)
A cli command for using Amaz3D from a terminal session
Please consider that an Amaz3d account is required for using all functionalities
For further information visit: Adapta Studio Website
Object primitives
amaz3dpy provides primitives for interacting with Amaz3d functionalities. Here you can find the import statements for the main objects:
from amaz3dpy.auth import Auth
from amaz3dpy.projects import Projects
from amaz3dpy.models import LoginInput, Optimization, OptimizationNormalBakingParamsInput, OptimizationOutputFormat, OptimizationParams, OptimizationPreset, Project
from amaz3dpy.optimizations import ProjectOptimizations
from amaz3dpy.customer_wallet import CustomerWallet
from amaz3dpy.optimization_templates import OptimizationTemplates
from amaz3dpy.terms import Terms
Client
The client encapsulates object primitives to follow the application business logic:
from amaz3dpy.clients import Amaz3DClient
from amaz3dpy.models import OptimizationOutputFormat, OptimizationParams, OptimizationPreset
amaz3dclient = Amaz3DClient()
amaz3dclient.login(email="your@email.com",password="mypass")
my_project = {"name": "My project", "file_path":"/path/to/file"}
amaz3dclient.create_project(**my_project)
amaz3dclient.load_projects()
print(amaz3dclient.projects()
amaz3dclient.select_a_project(id="....id.....")
amaz3dclient.load_optimizations()
print(amaz3dclient.optimizations())
format = OptimizationOutputFormat['format_orig']
params = OptimizationParams()
params.face_reduction = 0.5
params.feature_importance = 0
params.preserve_hard_edges = False
....
optimization = amaz3dclient.create_optimization("my optimization", format, params=params)
amaz3dclient.select_an_optimization(id=".....id......")
amaz3dclient.download_selected_optimization(dst_path="/my/path")
Cli
It is possible to run a simple interactive CLI application for creating projects and optimizations. Open your terminal and run:
amaz3d
Login
Run the login command, and insert your credentials
Projects management
It is possible to load and view projects by running load_projects and projects
The first command loads projects page by page.
The second command instead prints all projects loaded.
create_project is used to create a new project and to upload an object that could be optimized afterwards
Optimizations management
Before creating or visualizing optimization it is necessary to select a project with select_project command.
Optimization visualization follows the same logic of projects: use load_optimizations and optimizations commands
create_optimization is used to create an optimization for the selected project. It is possible to create optimization by selecting a preset or by tweaking advanced parameters
Downlaod an optimization
To download an optimization it is necessary to select it first using the select_optimization command. After that an optimization is selected it is possible to download the result with the download_selected_optimization command.
Help
Type help to get a list of available commands
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
Built Distribution
File details
Details for the file amaz3dpy-0.1.7.tar.gz
.
File metadata
- Download URL: amaz3dpy-0.1.7.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.0 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 558da9877f28b3e21695352cdff9e52e2a7df0e9477ac20133c44de5dc33b8ac |
|
MD5 | 30975b04e03cd7075391c80627cfc37c |
|
BLAKE2b-256 | 55b5867ec2c4d765f2803e4ce32b95d2a1eec2e40e6bdfc56c44ef9105b5cd25 |
File details
Details for the file amaz3dpy-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: amaz3dpy-0.1.7-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.0 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77e98e8ebde80b995f68b6678878a1eabbe32ac32871fb9af53e90ea8b0723c4 |
|
MD5 | a6c27516e4cbf597601cc91891a8d8d9 |
|
BLAKE2b-256 | e19bc4f659463fb077f5f5dbc324b876a7d98eb268cbb8b93fdc031ede53b4e7 |