The constructor allows you to specify your own API secret key and HTTP request strategy when your application is interacting with the Magic API.
Magic(api_secret_key=None, retries=3, timeout=10, backoff_factor=0.02)
api_secret_key
(str): Your API secret Key retrieved from the Magic Dashboard.retries
(num): Total number of retries to allow.timeout
(num): A period of time the request is going to wait for a response.backoff_factor
(num): A backoff factor to apply between retry attempts.
- A
Magic
object that provides access to all the supported resources.
from magic_admin import Magic
magic = Magic(
api_secret_key='<YOUR_API_SECRET_KEY>'
retries=5,
timeout=5,
backoff_factor=0.01,
)