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

Method create_crew_from_zip

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

Create a crew deployment from a local project ZIP archive. PROJECT_ID is `[tool.crewai].project_id`, so AMP knows which project the deployment runs; sent only when the project has one.

(
        self,
        zip_file_path: str | Path,
        *,
        name: str | None = None,
        env: dict[str, str] | None = None,
        project_id: str | None = None,
    )

Source from the content-addressed store, hash-verified

165 return client.request(method, url, files=files, **request_kwargs)
166
167 def create_crew_from_zip(
168 self,
169 zip_file_path: str | Path,
170 *,
171 name: str | None = None,
172 env: dict[str, str] | None = None,
173 project_id: str | None = None,
174 ) -> httpx.Response:
175 """Create a crew deployment from a local project ZIP archive.
176
177 PROJECT_ID is `[tool.crewai].project_id`, so AMP knows which project the
178 deployment runs; sent only when the project has one.
179 """
180 data: dict[str, str] = {}
181 if name:
182 data["name"] = name
183 if project_id:
184 data["project_id"] = project_id
185 if env:
186 data.update({f"env[{key}]": value for key, value in env.items()})
187 return self._make_multipart_request(
188 "POST",
189 f"{self.CREWS_RESOURCE}/zip",
190 zip_file_path=zip_file_path,
191 data=data or None,
192 timeout=300,
193 )
194
195 def update_crew_from_zip(
196 self,

Calls 2

updateMethod · 0.45