root/dev/: dmmc-1.2.1 metadata and description

Simple index

darsman media SDK

author darsman
requires_dist
  • grpcio>=1.62.1
  • protobuf

Because this project isn't in the mirror_whitelist, no releases from root/pypi are included.

File Tox results History
dmmc-1.2.1-py3-none-any.whl
Size
13 KB
Type
Python Wheel
Python
3
  • Uploaded to root/dev by root 2024-08-19 06:38:12
dmmc-1.2.1.tar.gz
Size
9 KB
Type
Source
  • Uploaded to root/dev by root 2024-08-19 06:38:13

# Darsman MEDIA-SDK

MEDIA-SDK for integrate with Darsman MEDIA microservice


## Installation

Install darsman_media_sdk with pip

```bash
pip config --user set global.index-url https://pypi.darsman.com/root/dev/+simple/
pip config --user set global.trusted-host https://pypi.darsman.com
```
then :
```bash
pip install darsman_media
```


## Usage/Examples

```python
from darsman_media.interface import MediaSDK


darsman_media = MediaSDK(url='localhost:50051')
```

if you want to ..
### retrieve media:


```python
darsman_media.media(api_key='TEST_API_KEY', uuid_id='...')
```
response ==> dict

### create media:


```python
darsman_media.create_media(
api_key='TEST_API_KEY',
file: str,
file_name,
extension,
file_size,
bucket,
store_place_type,
acl='public-read',
create_identifier=None,
**kwargs
)
```
* the file parameter is the file dircetion you want to upload

* file_name and extension are for save in destination

* **kwargs are the other field of media those are optional

response ==> dict

### validate media:

to undrestand a media exist or not

```python
darsman_media.validate_media(api_key='TEST_API_KEY', uuid_id='...')
```
response ==> True or False




### retrieve bucket:


```python
darsman_media.bucket(api_key='TEST_API_KEY', uuid_id='...', **kwargs)
```
response ==> dict


### create bucket:
could determine is_public in kwargs

```python
darsman_media.create_bucket(api_key='TEST_API_KEY', name='test', **kwargs)
```
response ==> dict


### update bucket:
could determine is_public and name in kwargs

```python
darsman_media.update_bucket(api_key='TEST_API_KEY', **kwargs)
```
response ==> dict

### validate bucket:
could determine is_public and name in kwargs

```python
darsman_media.validate_bucket(api_key='TEST_API_KEY', uuid_id='..')
```
response ==> True or False


Render warnings:
<string>:23: (WARNING/2) Inline literal start-string without end-string.