MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / update_crew_from_zip

Method update_crew_from_zip

lib/cli/src/crewai_cli/plus_api.py:195–223  ·  view source on GitHub ↗

Update an existing crew deployment from a local project ZIP archive. PROJECT_ID as for `create_crew_from_zip`; FORCE redeploys even while a models comparison runs on the deployment (AMP answers 409 ``comparison_running`` otherwise; an older AMP ignores it).

(
        self,
        uuid: str,
        zip_file_path: str | Path,
        *,
        env: dict[str, str] | None = None,
        project_id: str | None = None,
        force: bool = False,
    )

Source from the content-addressed store, hash-verified

193 )
194
195 def update_crew_from_zip(
196 self,
197 uuid: str,
198 zip_file_path: str | Path,
199 *,
200 env: dict[str, str] | None = None,
201 project_id: str | None = None,
202 force: bool = False,
203 ) -> httpx.Response:
204 """Update an existing crew deployment from a local project ZIP archive.
205
206 PROJECT_ID as for `create_crew_from_zip`; FORCE redeploys even while a
207 models comparison runs on the deployment (AMP answers 409
208 ``comparison_running`` otherwise; an older AMP ignores it).
209 """
210 data: dict[str, str] = {}
211 if project_id:
212 data["project_id"] = project_id
213 if force:
214 data["force"] = "true"
215 if env:
216 data.update({f"env[{key}]": value for key, value in env.items()})
217 return self._make_multipart_request(
218 "POST",
219 f"{self.CREWS_RESOURCE}/{uuid}/zip_update",
220 zip_file_path=zip_file_path,
221 data=data or None,
222 timeout=300,
223 )
224
225
226__all__ = ["PlusAPI"]

Calls 2

updateMethod · 0.45