#Conflict between Cloudflare Workers checks & Cloudflare docs

1 messages · Page 1 of 1 (latest)

arctic breach
#

I'm using Python for my Worker, and This Cloudflare page described that I can use aiohttp package, but when i include that package along with fastapi in requirements.txt, I have the error: " found in requirements.txt. Note that requirements.txt should contain package names only, not version specifiers.

I tried many ways to remove the error:

  • Remove the requirements.txt, after that my Worker return ModuleNotFoundError error
  • Add packages back requirements.txt (or even empty the file), after that Wrangler still said " found in requirements.txt. Note that requirements.txt should contain package names only, not version specifiers.
  • Try to ignore the above error, now Cloudflare Workers return error You cannot yet deploy Python Workers that depend on packages defined in requirements.txt.

But that Cloudflare page link above has intruction for the use of requirements.txt. So how can I use packages that supported by that page (fastapi and aiohttp)?

frank shuttle
#
Python Workers are in open beta.
You can currently only use built-in packages in local development. Support for deploying packages with a requirements.txt file is coming soon.

What do your imports look like? You shouldn't need a requirements.txt file to import the built-in packages

arctic breach
frank shuttle
#

can you try

from fastapi import FastAPI, Request

instead?

frank shuttle
#

Interessant - I'm giving it a spin locally now

arctic breach
#

lol

#

I have no idea why

#

😢

frank shuttle
#

I think they just aren't ready yet - it does seem to imply that fastapi is a built-in package but maybe it isnt yet

#

for now i guess developing it locally is the only option

arctic breach
#

Okay ty