A twitter-toy-clone frontend using Python and Flask
Project description
A toy-twitter-clone frontend using Python and Flask.
To run this Flask application,
$ pip install pytwask
$ export FLASK_APP=autopytwask
$ export PYTWASK_ENV=prod
$ flask run
1. Features
This module implements the frontend for a simplified Twitter clone based on Flask.
It supports the following features:
Register new users
Log in/out
Change user password
Get user profile
Post tweets
Follower/Following
General timeline for anonymous user
User timeline
Get tweets posted by one user
TODOs:
Search users
Delete a user
Recover user password
#hashtags
@mentions
Retweets
Replies
Conversations
Edit/Delete tweets
And more
2. Backend database
Although currently we only have Redis as the only type of backend database, we can easily switch to another type of backend database as long as the backend module conforms to the same interface as the Redis backend module pytwis.
3. MTV architecture
This Flask application follows the typical Flask Model-Template-View pattern. Its directory layout follows the ones given at
Specifically,
. ├── autopytwask.py # The Flask script which creates this Flask application └── pytwask ├── auth # The authentication blueprint ├── config.py # The Flask application configuration file ├── __init__.py ├── main # The main blueprint ├── models.py # The data Model ├── static # The HTML resources (css, images, javascript) ├── templates # The HTML Templates └── tweets # The tweets blueprint
4. Development
By default, this Flask application will run in the development mode where the Flask DebugToolbar is enabled.
$ git clone https://github.com/renweizhukov/pytwask.git
$ cd pytwask
$ pip install -e .
$ export FLASK_APP=autopytwask
$ flask run
5. README.rst
README.rst is generated from README.md via pandoc.
$ pandoc --from=markdown --to=rst --output=README.rst README.md
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pytwask-0.1.0.tar.gz
.
File metadata
- Download URL: pytwask-0.1.0.tar.gz
- Upload date:
- Size: 58.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eef33c6bc85280cdc60fa38d0c57902651cd1f6db1f7e9f5a1421b41744db378 |
|
MD5 | 693f39b32d16b8e1b217ca0d1fd44d0b |
|
BLAKE2b-256 | 674d2bfef6b6786ed75cecb1de352adb468deecdc5cbff158a4528050be2875f |
File details
Details for the file pytwask-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pytwask-0.1.0-py3-none-any.whl
- Upload date:
- Size: 68.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85090f78eb414ea478603e5f1859b039fd62d99469f55361e3b67c45e34edd88 |
|
MD5 | d6b87a139f71aeee2435415919636493 |
|
BLAKE2b-256 | f9bda196383d518f505fad700053a9aaed4f2a33b17b97b384ae00f7a7b96a5b |