Skip to content

Instalike is a clone of the Instagram desktop application, written in Python with Flask. It's still a work in progress.

Notifications You must be signed in to change notification settings

ericdaat/instalike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instalike

Instalike is a clone of the Instagram desktop application, written in Python with Flask. It's still a work in progress.

Screenshots

Home page

User profile

Installation

There is a Makefile to help you getting started, running the following commands should work:

# create a virtual env and install libraries
make venv/bin/activate

# initialize the sqlite database
make init

# run the flask application in debug mode
make start

Data model

We use a single relational database (namely sqlite) with SQL Alchemy ORM to handle the data. The tables are defined in the src.application.model module.

Here are some code snippets to show you how we populate the database.

# create a user
user = User(username="username",
            email="username@example.com",
            fullname="User Name",
            bio="Hi! I'm User",
            avatar="image_url")

# create a post for this user
post = Post(user_id=user.id,
            content="Here's my post!",
            picture="image_url")

# make the user like the post
user.likes.append(post)

# make the user comment the post
comment = Comments(user=user,
                   content="Love it!")
post.comments.append(comment)

# make the user follow another user
user.follows.append(another_user)

About

Instalike is a clone of the Instagram desktop application, written in Python with Flask. It's still a work in progress.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published