66 * [ env\_ list] ( #env_list )
77 * [ env\_ delete] ( #env_delete )
88* [ cortex.client.Client] ( #cortex-client-client )
9- * [ create\_ api] ( #create_api )
9+ * [ deploy] ( #deploy )
10+ * [ deploy\_ realtime\_ api] ( #deploy_realtime_api )
11+ * [ deploy\_ async\_ api] ( #deploy_async_api )
12+ * [ deploy\_ batch\_ api] ( #deploy_batch_api )
13+ * [ deploy\_ task\_ api] ( #deploy_task_api )
14+ * [ deploy\_ traffic\_ splitter] ( #deploy_traffic_splitter )
1015 * [ get\_ api] ( #get_api )
1116 * [ list\_ apis] ( #list_apis )
1217 * [ get\_ job] ( #get_job )
1318 * [ refresh] ( #refresh )
1419 * [ patch] ( #patch )
15- * [ delete\_ api ] ( #delete_api )
20+ * [ delete] ( #delete )
1621 * [ stop\_ job] ( #stop_job )
1722 * [ stream\_ api\_ logs] ( #stream_api_logs )
1823 * [ stream\_ job\_ logs] ( #stream_job_logs )
@@ -57,7 +62,7 @@ Create a new environment to connect to an existing cluster, and initialize a cli
5762## env\_ list
5863
5964``` python
60- env_list() -> list
65+ env_list() -> List
6166```
6267
6368List all environments configured on this machine.
@@ -76,36 +81,142 @@ Delete an environment configured on this machine.
7681
7782# cortex.client.Client
7883
79- ## create \_ api
84+ ## deploy
8085
8186<!-- CORTEX_VERSION_MINOR -->
8287
8388``` python
84- | create_api (api_spec: dict , handler = None , task = None , requirements = [], conda_packages = [ ], project_dir: Optional[ str ] = None , force: bool = True , wait: bool = False ) -> list
89+ | deploy (api_spec: Dict[ str , Any ], project_dir: str , force: bool = True , wait: bool = False )
8590```
8691
87- Deploy an API.
92+ Deploy API(s) from a project directory .
8893
8994** Arguments** :
9095
9196- ` api_spec ` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/ for schema.
92- - ` handler ` - A Cortex handler class implementation. Not required for TaskAPI/TrafficSplitter kinds.
93- - ` task ` - A callable class/function implementation. Not required for RealtimeAPI/BatchAPI/TrafficSplitter kinds.
97+ - ` project_dir ` - Path to a python project.
98+ - ` force ` - Override any in-progress api updates.
99+ - ` wait ` - Streams logs until the APIs are ready.
100+
101+
102+ ** Returns** :
103+
104+ Deployment status, API specification, and endpoint for each API.
105+
106+ ## deploy\_ realtime\_ api
107+
108+ <!-- CORTEX_VERSION_MINOR -->
109+
110+ ``` python
111+ | deploy_realtime_api(api_spec: Dict[str , Any], handler, requirements: Optional[List] = None , conda_packages: Optional[List] = None , force: bool = True , wait: bool = False ) -> Dict
112+ ```
113+
114+ Deploy a Realtime API.
115+
116+ ** Arguments** :
117+
118+ - ` api_spec ` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/realtime-apis/configuration for schema.
119+ - ` handler ` - A Cortex Handler class implementation.
94120- ` requirements ` - A list of PyPI dependencies that will be installed before the handler class implementation is invoked.
95121- ` conda_packages ` - A list of Conda dependencies that will be installed before the handler class implementation is invoked.
96- - ` project_dir ` - Path to a python project.
97122- ` force ` - Override any in-progress api updates.
98123- ` wait ` - Streams logs until the APIs are ready.
99124
100125
126+ ** Returns** :
127+
128+ Deployment status, API specification, and endpoint for each API.
129+
130+ ## deploy\_ async\_ api
131+
132+ <!-- CORTEX_VERSION_MINOR -->
133+
134+ ``` python
135+ | deploy_async_api(api_spec: Dict[str , Any], handler, requirements: Optional[List] = None , conda_packages: Optional[List] = None , force: bool = True ) -> Dict
136+ ```
137+
138+ Deploy an Async API.
139+
140+ ** Arguments** :
141+
142+ - ` api_spec ` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/async-apis/configuration for schema.
143+ - ` handler ` - A Cortex Handler class implementation.
144+ - ` requirements ` - A list of PyPI dependencies that will be installed before the handler class implementation is invoked.
145+ - ` conda_packages ` - A list of Conda dependencies that will be installed before the handler class implementation is invoked.
146+ - ` force ` - Override any in-progress api updates.
147+
148+
149+ ** Returns** :
150+
151+ Deployment status, API specification, and endpoint for each API.
152+
153+ ## deploy\_ batch\_ api
154+
155+ <!-- CORTEX_VERSION_MINOR -->
156+
157+ ``` python
158+ | deploy_batch_api(api_spec: Dict[str , Any], handler, requirements: Optional[List] = None , conda_packages: Optional[List] = None ) -> Dict
159+ ```
160+
161+ Deploy a Batch API.
162+
163+ ** Arguments** :
164+
165+ - ` api_spec ` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/batch-apis/configuration for schema.
166+ - ` handler ` - A Cortex Handler class implementation.
167+ - ` requirements ` - A list of PyPI dependencies that will be installed before the handler class implementation is invoked.
168+ - ` conda_packages ` - A list of Conda dependencies that will be installed before the handler class implementation is invoked.
169+
170+
171+ ** Returns** :
172+
173+ Deployment status, API specification, and endpoint for each API.
174+
175+ ## deploy\_ task\_ api
176+
177+ <!-- CORTEX_VERSION_MINOR -->
178+
179+ ``` python
180+ | deploy_task_api(api_spec: Dict[str , Any], task, requirements: Optional[List] = None , conda_packages: Optional[List] = None ) -> Dict
181+ ```
182+
183+ Deploy a Task API.
184+
185+ ** Arguments** :
186+
187+ - ` api_spec ` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/task-apis/configuration for schema.
188+ - ` task ` - A callable class implementation.
189+ - ` requirements ` - A list of PyPI dependencies that will be installed before the handler class implementation is invoked.
190+ - ` conda_packages ` - A list of Conda dependencies that will be installed before the handler class implementation is invoked.
191+
192+
193+ ** Returns** :
194+
195+ Deployment status, API specification, and endpoint for each API.
196+
197+ ## deploy\_ traffic\_ splitter
198+
199+ <!-- CORTEX_VERSION_MINOR -->
200+
201+ ``` python
202+ | deploy_traffic_splitter(api_spec: Dict[str , Any]) -> Dict
203+ ```
204+
205+ Deploy a Task API.
206+
207+ ** Arguments** :
208+
209+ - ` api_spec ` - A dictionary defining a single Cortex API. See https://docs.cortex.dev/v/master/workloads/realtime-apis/traffic-splitter/configuration for schema.
210+
211+
101212** Returns** :
102213
103214 Deployment status, API specification, and endpoint for each API.
104215
105216## get\_ api
106217
107218``` python
108- | get_api(api_name: str ) -> dict
219+ | get_api(api_name: str ) -> Dict
109220```
110221
111222Get information about an API.
@@ -122,7 +233,7 @@ Get information about an API.
122233## list\_ apis
123234
124235``` python
125- | list_apis() -> list
236+ | list_apis() -> List
126237```
127238
128239List all APIs in the environment.
@@ -134,7 +245,7 @@ List all APIs in the environment.
134245## get\_ job
135246
136247``` python
137- | get_job(api_name: str , job_id: str ) -> dict
248+ | get_job(api_name: str , job_id: str ) -> Dict
138249```
139250
140251Get information about a submitted job.
@@ -165,7 +276,7 @@ Restart all of the replicas for a Realtime API without downtime.
165276## patch
166277
167278``` python
168- | patch(api_spec: dict , force: bool = False ) -> dict
279+ | patch(api_spec: Dict , force: bool = False ) -> Dict
169280```
170281
171282Update the api specification for an API that has already been deployed.
@@ -175,10 +286,10 @@ Update the api specification for an API that has already been deployed.
175286- ` api_spec ` - The new api specification to apply
176287- ` force ` - Override an already in-progress API update.
177288
178- ## delete\_ api
289+ ## delete
179290
180291``` python
181- | delete_api (api_name: str , keep_cache: bool = False )
292+ | delete (api_name: str , keep_cache: bool = False )
182293```
183294
184295Delete an API.
0 commit comments