sparckles / Robyn

Robyn is a Super Fast Async Python Web Framework with a Rust runtime.
https://robyn.tech/
BSD 2-Clause "Simplified" License
4.19k stars 214 forks source link

Robyn `--create` template typo. #657

Closed Mr-Sunglasses closed 10 months ago

Mr-Sunglasses commented 10 months ago

Bug Description

When We create a new project using python3 -m robyn --create it should create the from from this template


from robyn import Robyn

app = Robyn(__file__)

@app.get("/")
def index():
    return "Hello World!"

if __name__ == "__main__":
    app.start()

But it is creating

from Robyn import Robyn

app = Robyn(__file__)

@app.get("/")
def index():
    return "Hello World!"

if __name__ == "__main__":
    app.start()

Ref : Line Which is giving an Import error.

Steps to Reproduce

python3 -m robyn --create

cd app/

python3 main.py

Traceback (most recent call last):
  File "/Users/kanishkpachauri/Desktop/oss/robyn/app1/app.py", line 2, in <module>
    from Robyn import Robyn
ModuleNotFoundError: No module named 'Robyn'

Your operating system

MacOS

Your Python version (python --version)

3.11

Your Robyn version

main branch

Additional Info

No response

Mr-Sunglasses commented 10 months ago

Hey, @sansyrox 👋🏻 While going through the git blame of the file __main__.py I noticed that this PR breaks a lot of things inside the repo as it seems it had just find and replace robyn to Robyn so it caused a lot of things to break. I'm finding out if any more things should have been broken with this PR and fixing it 😄 .

Update: Gone through the whole PR and fixed all the typos that are broken. 😊

sansyrox commented 10 months ago

Thank you @Mr-Sunglasses 😄 ✨