MedRouter is a Python library designed to facilitate the interaction with various APIs for medical AI applications. Currently, it supports segmentation models, with plans to expand into other domains soon. This project is powered by PYCAD.
Features
- Easy API Integration: Simplifies the process of calling different APIs hosted on external servers.
- Segmentation Models: Supports segmentation models with more models and domains to be added in the future.
- Error Handling: Provides robust error handling to ensure smooth operation.
Installation
You can install MedRouter using pip:
pip install medrouter
Usage
Here's a quick example of how to use the MedRouter library:
from medrouter import MedRouter
# Initialize the client with your API key
client = MedRouter(api_key="your_api_key")
# Run a segmentation model
predictions = client.segmentation.create(
source="path_to_file",
model="total-segmentator"
)
print(predictions)
Available Models
- total-segmentator: A model for comprehensive segmentation tasks.
Error Handling
MedRouter provides specific exceptions to handle common errors:
ModelNotFoundError: Raised when the specified model is not found.InferenceError: Raised when there is an error during the inference process.APIKeyError: Raised when there is an issue with the API key, such as it being missing or incorrect.
Contributing
We welcome contributions to expand the capabilities of MedRouter. Please feel free to submit issues or pull requests.
License
This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.
Contact
For more information, please contact us at contact@pycad.co.
MedRouter is a project by PYCAD, dedicated to advancing medical AI technologies.
Metadata
Release files for medrouter 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| medrouter-0.5.0.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| medrouter-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.4 kB
Release files / medrouter-0.5.0.tar.gz
| Download URL | medrouter-0.5.0.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e761667c212cb883a12224452697e000ee21586e38813ce4d0ab477e421f1d5f
|
|
BLAKE2b-256 checksum How to use checksums |
6edd48c367afac1290ee37ccc617674e48f640726f904afb9e62e50fcfd0a1b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.14
|
Release files / medrouter-0.5.0-py3-none-any.whl
| Download URL | medrouter-0.5.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a130f8864f2aaf4719a963343b3e47d7edd385223044ae6badad23241cefa095
|
|
BLAKE2b-256 checksum How to use checksums |
d7d15151bbe50313442c85a2a67351ec2d90a55a2c364b98a6762f4cc6b1e066
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.14
|