Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,608 members, 7,809,229 topics. Date: Friday, 26 April 2024 at 06:05 AM

Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) (4007 Views)

HOWTO: Create A Simple API With Python And Flask / Pls Help With Python Problem / Dll Load Failure With Py2exe (python And Qt) (2) (3) (4)

(1) (Reply) (Go Down)

Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by pystar: 6:42pm On Aug 16, 2014
This thread is for python users and people interested in using Flask to build web applications. Flask is my framework of choice because it doesnt make choices for you (ala Django or web2py) and its simple and extremely powerful.

Here is a simple "hello world app" in flask

from flask import Flask

app = Flask(__name__)

@app.route("/"wink
def index():
return "hello world"

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

So in this thread we would be building a simple bare bones reddit.com app with flask as a learning tool and to demonstrate the awesome power of flask.

Requirements:
0. Knowledge of the Python programming language and have it installed on your system (UNIX or Linux preferably)
1. Read up on virtual environments
2. Knowledge of simple git commands

I will be committing each of the stages to get-up so ensure you have a github account to enable you to pull the code to inspect our committees.
If you have any issues or questions, don't hesitate to send me a PM.
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by pystar: 7:01pm On Aug 16, 2014
Kindly install git on your machine and clone the repository from https://github.com/aitoehigie/reddish.git
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by curiouslad(m): 2:05pm On Aug 17, 2014
Would be interesting to see how you structure your flask app
Following...
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by Nobody: 2:38pm On Aug 17, 2014
*spreads mat yakata for ground*
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by pystar: 3:11pm On Aug 17, 2014
To all those following this thread, kindly pull the repository for the latest commit.

Please ensure you have activated the virtual environment by:
"cd ~/path to repository"
"virtualenv venv/bin/activate"

after doing that successfully, kindly run:
"pip install -r requirements.txt"
from the app folder to install all the requirements for the app to run.

from the root of the application, run the application handler with:
"python run.py"

I would be splitting major features of this learning app by creating branches for each part so the learning process would be gradual and procedural.

If you have any issues with the above, you can ask here or send a PM.

P.S: These are Linux commands and won't run on windows, to circumvent this, install cygwin or better still just remove windows and install Linux Mint.
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by pystar: 3:12pm On Aug 17, 2014
curiouslad: Would be interesting to see how you structure your flask app
Following...

Kindly pull the repository to see how I structured my app. I dont use Blueprints.
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by curiouslad(m): 9:17pm On Aug 17, 2014
Ok

lipsrsealed

Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by pystar: 10:54pm On Aug 17, 2014
curiouslad: Ok

lipsrsealed

Did you run the requirements.txt file with pip before trying to run the app?
You have to install all the requirements before you can run the app, or else you would have errors
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by curiouslad(m): 9:24am On Aug 18, 2014
pystar:
Did you run the requirements.txt file with pip before trying to run the app?
You have to install all the requirements before you can run the app, or else you would have errors

Yup, it iterated over the lists and installed the packages.

#sidecomment. Do you plan to use neo4j ?
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by misteri: 3:49pm On Aug 18, 2014
Following
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by pystar: 7:55pm On Aug 18, 2014
curiouslad:

Yup, it iterated over the lists and installed the packages.

#sidecomment. Do you plan to use neo4j ?
For this particular app? No. Introducing graph theory into this learning app would be unnecessary.
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by jajad: 5:27pm On Sep 18, 2014
pystar, this tutorial has stalled. sad
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by pystar: 7:32pm On Sep 18, 2014
jajad: pystar, this tutrial has stalled. sad
Work ish and discovering Neo4j took me away. ***In Arnold Schwazeneggers voice*** I will be back
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by Nobody: 7:37pm On Nov 09, 2014
You never came back. you dead?
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by Nobody: 8:51pm On Nov 09, 2014
Abeg na who die?
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by Ajibel(m): 10:47pm On Nov 11, 2014
This tutorial already exists!!
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by pystar: 9:10am On Nov 12, 2014
Another flask tutorial of mine has taken precedence over this. Kindly check.
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by pystar: 9:11am On Nov 12, 2014
Ajibel:
This tutorial already exists!!
Where?
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by pystar: 9:12am On Nov 12, 2014
Naijazoom:
You never came back. you dead?
That statement is rather unnecessary, thoughtless and utterly tasteless. Just saying.
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by Ajibel(m): 10:44am On Nov 12, 2014
pystar:

Where?


I saw it early this year except you're the same person that wrote it.
Re: Build A Bare Bones Reddit Clone With Python And Flask (hands On Tutorial Thread) by slightlyMad(f): 12:03pm On Nov 12, 2014
dude, make a video tut of this sht and up it to youtube, monitize it and share the video here.

(1) (Reply)

Need An Android App For Your Blog/website? Get One Free / Smart Home And Home Automation - How Did You Get Started? / What Programming Languages Have You Used?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 20
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.