Failed to import a package

I failed to import this package. Can anyone help?

from http_client.client import HTTPClient, Headers

Error:

life.mojo:1:6: error: unable to locate module 'http_client'
from http_client.client import HTTPClient, Headers
     ^
life.mojo:1:18: error:
from http_client.client import HTTPClient, Headers

Hey, I’m the author of that repo and it’s been awhile since I’ve updated it, so it most definitely would not work with more recent versions of Mojo. I’m working on a new version for the upcoming 25.4 release.

In the meantime, I recommend using the client in the lightbug_http package GitHub - Lightbug-HQ/lightbug_http: Simple and fast HTTP framework for Mojo! 🔥🐝

1 Like