forked from runpod/runpod-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
53 lines (43 loc) · 1.43 KB
/
__init__.py
File metadata and controls
53 lines (43 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
""" Allows runpod to be imported as a module. """
import os
import logging
from . import serverless
from .api.ctl_commands import (
create_container_registry_auth,
create_endpoint,
create_pod,
create_template,
get_endpoints,
get_gpu,
get_gpus,
get_pod,
get_pods,
get_user,
resume_pod,
stop_pod,
terminate_pod,
update_endpoint_template,
update_user_settings,
)
from .cli.groups.config.functions import (
check_credentials,
get_credentials,
set_credentials,
)
from .endpoint import AsyncioEndpoint, AsyncioJob, Endpoint
from .serverless.modules.rp_logger import RunPodLogger
from .version import __version__
# ------------------------------- Config Paths ------------------------------- #
SSH_KEY_PATH = os.path.expanduser("~/.runpod/ssh")
profile = "default" # pylint: disable=invalid-name
_credentials = get_credentials(profile)
if _credentials is not None:
api_key = _credentials["api_key"] # pylint: disable=invalid-name
else:
api_key = None # pylint: disable=invalid-name
api_url_base = "https://api.runpod.io" # pylint: disable=invalid-name
endpoint_url_base = "https://api.runpod.ai/v2" # pylint: disable=invalid-name
# --------------------------- Force Logging Levels --------------------------- #
logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger("paramiko").setLevel(logging.WARNING)
logging.getLogger("uvicorn").setLevel(logging.WARNING)