Giter Site home page Giter Site logo

async-fastapi-mongo's People

Contributors

adolfojmnz avatar dependabot[bot] avatar mjhea0 avatar youngestdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

async-fastapi-mongo's Issues

Got error

Got the following error:

(my_venv) [root@centos-s-1vcpu-1gb-intel-nyc1-01 async-fastapi-mongo]# python app/main.py
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO: Started reloader process [96543] using statreload
Process SpawnProcess-1:
Traceback (most recent call last):
File "/usr/lib64/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib64/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/root/my_venv/lib/python3.8/site-packages/uvicorn/subprocess.py", line 62, in subprocess_started
target(sockets=sockets)
File "/root/my_venv/lib/python3.8/site-packages/uvicorn/main.py", line 390, in run
loop.run_until_complete(self.serve(sockets=sockets))
File "uvloop/loop.pyx", line 1501, in uvloop.loop.Loop.run_until_complete
File "/root/my_venv/lib/python3.8/site-packages/uvicorn/main.py", line 397, in serve
config.load()
File "/root/my_venv/lib/python3.8/site-packages/uvicorn/config.py", line 278, in load
self.loaded_app = import_from_string(self.app)
File "/root/my_venv/lib/python3.8/site-packages/uvicorn/importer.py", line 23, in import_from_string
raise exc from None
File "/root/my_venv/lib/python3.8/site-packages/uvicorn/importer.py", line 20, in import_from_string
module = importlib.import_module(module_str)
File "/usr/lib64/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/root/my_venv/async-fastapi-mongo/app/server/app.py", line 3, in
from app.server.routes.student import router as StudentRouter
ModuleNotFoundError: No module named 'app'

ModuleNotFound Error:

When I am running the API my console shows:
from app.server.routes.student import router as StudentRouter
ModuleNotFoundError: No module named 'app'.

How do I rectify it?
Please guide

Configure a static IP on Heroku with Fixie Socks and restrict access to the MongoDB Atlas database

I noticed in your blog post that you had mentioned using Fixie Socks to restrict access to the MongoDB Atlas Database. I'm curious if that is a step you were able to successfully implement. I have done something pretty close to the app you describe here and I really like how easy MongoDB Atlas is to work with, but I am having troubles using it with Heroku because Heroku doesn't have static IPs available except for enterprise tier customers. I tried using Fixie, Fixie Socks, and Quota Guard, but I don't think I am using them quite properly because when I install them as add-ons, my fastapi backend still tries to call Atlas directly. From what I can tell these add-ons basically just turn into a proxy server, but I'm not sure how to tell my application to pass traffic through. If you have any advice on getting this to work, I would be super interested!

no Module

I am trying to run server, But I have got the following error
from app.server.routes.studento\app\server\app.py", line 3, in < import router as StudentRouter
ModuleNotFoundError: No module nam import router as StudentRouter ed 'app'

ModuleNotFoundError: No module named 'app'

Hey man I'm following alone of your tutorial, greate stuff but I'm stucking at this error
~/Documents/Work/OMZ/async-fastapi-mongo/app master fastapi โฏ python main.py INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) INFO: Started reloader process [4440] using watchgod Process SpawnProcess-1: Traceback (most recent call last): File "/Users/lavendermp/anaconda3/envs/fastapi/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/Users/lavendermp/anaconda3/envs/fastapi/lib/python3.9/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/Users/lavendermp/anaconda3/envs/fastapi/lib/python3.9/site-packages/uvicorn/subprocess.py", line 61, in subprocess_started target(sockets=sockets) File "/Users/lavendermp/anaconda3/envs/fastapi/lib/python3.9/site-packages/uvicorn/server.py", line 48, in run loop.run_until_complete(self.serve(sockets=sockets)) File "/Users/lavendermp/anaconda3/envs/fastapi/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/Users/lavendermp/anaconda3/envs/fastapi/lib/python3.9/site-packages/uvicorn/server.py", line 55, in serve config.load() File "/Users/lavendermp/anaconda3/envs/fastapi/lib/python3.9/site-packages/uvicorn/config.py", line 308, in load self.loaded_app = import_from_string(self.app) File "/Users/lavendermp/anaconda3/envs/fastapi/lib/python3.9/site-packages/uvicorn/importer.py", line 23, in import_from_string raise exc from None File "/Users/lavendermp/anaconda3/envs/fastapi/lib/python3.9/site-packages/uvicorn/importer.py", line 20, in import_from_string module = importlib.import_module(module_str) File "/Users/lavendermp/anaconda3/envs/fastapi/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 790, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/Users/lavendermp/Documents/Work/OMZ/async-fastapi-mongo/app/server/app.py", line 3, in <module> from app.server.routes.student import router as StudentRouter ModuleNotFoundError: No module named 'app'
any idea to solve it?

Declare it as envvar or define a default value

File "D:\Project\async-fastapi-mongo\venv\Lib\site-packages\decouple.py", line 92, in get
raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option))
decouple.UndefinedValueError: MONGO_DETAILS not found. Declare it as envvar or define a default value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.