import json
import requests
from api_auth import APICredentials, APIParams
  
class Create_Library:
    def __init__(self):
        self.host = "https://services.uplynk.com"
  
    def run(self):
        self._create_library()
 
    def _create_library(self):
        url = "{}{}".format(self.host, "/api/v4/libraries")
 
        description = 'My Library' # Replace with the desired name.        
        
        payload = {
            'desc': description
        }
 
        headers = {'Content-Type': 'application/json'}
 
        response = requests.post(
            url, params=APIParams(APICredentials()).get_params({}), data=json.dumps(payload), headers=headers
        )
 
        print(response.json())
  
Create_Library().run()