moluwole / Bast

Simple but Elegant Web Framework
https://bast.readthedocs.io
MIT License
48 stars 10 forks source link

Can Panther be Python2 compatible? #12

Closed BolajiOlajide closed 6 years ago

BolajiOlajide commented 6 years ago

I completed the installation of Bast on my PC and when I tried to run the command panther --help, I get the error. screen shot 2018-08-22 at 10 20 52 pm

The secrets module isn't available in Python2 so I guess that's where the error stems from.

Python version: 2.7.14

webong commented 6 years ago

I have this same issue too setting up

iamhabbeboy commented 6 years ago

Thanks for posting out this issues, panther currently support python3, but we are also working on breaking the incompatibilities for python2

moluwole commented 6 years ago

Ooopss!!!! Sorry about that @BolajiOlajide @wisdomanthoni . Made use of Python 3 secret_token to generate the APP KEY. I've been working on making it Python 2 compatible and would have a release ASAP

moluwole commented 6 years ago

Boss of life @BolajiOlajide . av been dancing since morning when I saw that you are helping out. :dancer: :dancer: :dancer:

BolajiOlajide commented 6 years ago

Haha! Baba @moluwole

I'm just stopping by here, trying to see if I can write a blog post about building an API with Bast. Happy to help out in wherever I can whenever I can

webong commented 6 years ago

All this Baba Baba .... How old are you

moluwole commented 6 years ago

Me ke? I no be Baba ooo. I am a very small boy na. :grin:

:raised_hands: for the Baba's @BolajiOlajide @wisdomanthoni

moluwole commented 6 years ago

@BolajiOlajide @iamhabbeboy @wisdomanthoni just uploaded a version of Pypi which should work with Python2. There might be a need to include a __init__.py file in the packages where python files reside when you create a new project. Would update that also ASAP

BolajiOlajide commented 6 years ago

Apologies. Didn't realize I closed this.

@moluwole Please close when you feel it's right.

Awesome stuff @moluwole ... Since the purpose of the secrets package is to generate an APP_KEY, I'm guessing the user can normally override that if they want yeah, why don't you generate some random string instead.

moluwole commented 6 years ago

Already done that @BolajiOlajide... now using os.urandom to generate the APP_KEY as it's more compatible. Tried to cleanup to ensure that it's all Python 2.7 compatible so as soon as any issues come up, you can open up an issue. Thanks boss :bow: