Versatile solution for sharing apps through secure URLs
Project description
ModelPark
ModelPark provides a versatile platform to share and manage your ML models directly from your machine, offering a convenient Python API to manage these tasks programmatically, including controlling access and publishing applications.
See ModelPark website and platform for more details.
Features
- Share models directly from the Python API.
- Publish and manage applications using the ModelPark Python API.
- Configure access management according to your needs through Python methods.
Installation
To install ModelPark, you can use pip:
pip install modelpark
Configuration
Ensure Python and pip are installed on your machine. This API interfaces with the ModelPark CLI but manages interactions programmatically through Python.
Usage
Here's how you can use the ModelPark Python package:
Initialize and Login
from modelpark import ModelPark
mp = ModelPark()
mp.login(username="your_username", password="your_password")
mp.init()
Register an Application
Register an app running on a certain port
mp.register(port=3000, name="my-app", access="public")
# access='private' if private (not visible/ accessible in modelpark dashboard)
Register a password protected app running on a certain port
mp.register(port=3000, name="my-app", access="public", password='123')
Register a streamlit app that is not run yet
mp.register(port=3000, name="my-app", file_path="~/my-app/streamlit-app.py", access="public", framework="streamlit")
List Registered Applications
mp.ls()
Make an API Call to a Registered Application
from modelpark import APIManager
mp_api = APIManager()
user_credentials = {'username': 'your_username', 'password': 'your_password'}
app_name = 'my-app'
payload = {'key': 'value'} # Payload required by the application
# Make the API call
response = mp_api.make_api_call(app_name, user_credentials, payload)
print(response.json()) # Assuming the response is in JSON format
Stop and Logout
mp.stop()
mp.logout()
Kill an Application
mp.kill(name="my-app")
This API provides a more Pythonic way of managing your applications with ModelPark compared to using the CLI directly.
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 Distribution
Built Distribution
File details
Details for the file modelpark-0.1.10.tar.gz
.
File metadata
- Download URL: modelpark-0.1.10.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b9939fb28f5437ccf8aa5fd892fe1d4d491a54a4e34896454c48333c9479ca9 |
|
MD5 | 984976c0b5db0fc58f84fe603826f84e |
|
BLAKE2b-256 | c7535e1636a22366c1e8e0cb5b684250e12686ddbc25f661360963a7a2ed6702 |
File details
Details for the file modelpark-0.1.10-py3-none-any.whl
.
File metadata
- Download URL: modelpark-0.1.10-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b182296e918da90acd575e23f23977577ed952a0e5357fcbba666a1ca8846731 |
|
MD5 | 234bb383c236a6bc6f2c4df65de549fd |
|
BLAKE2b-256 | dfdc10fc2eb8b1ed8e8827476f8fbc55e2b89d25ee9211839ef5f0661545195d |