Skip to main content

Flasik

[

Documentation

Flasik is A mid stack, batteries framework based on Flask. It adds structure to your Flask application, and group the endpoints by classes instead of just loose functions.

Technically Flasik is my attempt of making a simple framework based on Flask Great Again!

Decisions made for you + Features

  • Smart routing: automatically generates routes based on the classes and methods in your views

  • Class name as the base url, ie: class UserAccount will be accessed at '/user-account'

  • Class methods (action) could be accessed: hello_world(self) becomes 'hello-world'

  • Smart Rendering without adding any blocks in your templates

  • Auto rendering by returning a dict of None

  • Templates are mapped as the model in the class the $module/$class/$method.html

  • Markdown ready: Along with HTML, it can also properly parse Markdown

  • Auto route can be edited with @route()

  • Restful: GET, POST, PUT, DELETE

  • REST API Ready

  • bcrypt is chosen as the password hasher

  • Session: Redis, AWS S3, Google Storage, SQLite, MySQL, PostgreSQL

  • ORM: Active-Alchemy (SQLALchemy wrapper)

  • ReCaptcha: Flask-Recaptcha

  • Uses Arrow for dates

  • Active-Alchemy saves the datetime as arrow object, utc_now

  • CSRF on all POST

  • CloudStorage: Local, S3, Google Storage Flask-Cloudy

  • Mailer (SES or SMTP)

  • Caching

  • Propel for deployment

  • Decorators, lots of decorators

Quickstart

Install Flasik

To install Flasik, it is highly recommended to use a virtualenv, in this case I use virtualenvwrapper

mkvirtualenv my-flasik-site

Install Flasik

pip install flasik

Initialize your application

Now Flasik has been installed, let's create our first application

cd your-dir

flasik-admin setup

flasik-admin setup setup the structure along with the necessary files to get started

You will see a structure similar to this

/your-dir
    |
    |__ .gitignore
    |
    |__ propel.yml
    |
    |__ requirements.txt
    |
    |__ brew.py
    |
    |__ application/
        |
        |__ __init__.py
        |
        |__ config.py
        |
        |__ /models/
            |
            |__ __init__.py
            |
            |__ models.py
        |
        |__ /views/
            |
            |__ __init__.py
            |
            |__ main.py
        |
        |__ /templates/
            | 
            |__ /layouts/
                | 
                |__ base.jade
            |
            |__ /main/
                |
                |__ /Index/
                    |
                    |__ index.jade
        |
        |__ /static/
            |
            |__ assets.yml
            |
            |__ package.json
        |
        |__ /data/
            |
            |__ babel.cfg
            |
            |__ /uploads/
            |
            |__ /babel/
            |
            |__ /mail-templates/
        |
        |__ /lib/

Serve your first application

If everything is all set, all you need to do now is run your site:

flasik serve

It will start serving your application by default at 127.0.0.1:5000

Go to http://127.0.0.1:5000/


I hope this wasn't too hard. Now Read The Docs at http://mardix.github.io/Flasik/ for more

Thanks,

Mardix :)


Read The Docs

To dive into the documentation, Read the docs @ http://mardix.github.io/Flasik/


License MIT

Copyright: 2017 Mardix

Metadata

Release files for Flasik 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Flasik 0.5.1
File Size Uploaded
Flasik-0.5.1.tar.gz 109.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Flasik 0.5.1
File Interpreter ABI Platform
Flasik-0.5.1-py2-none-any.whl Python 2 none any Details

Total release size: 308.6 kB

Release files / Flasik-0.5.1.tar.gz

Download URL Flasik-0.5.1.tar.gz
Size 109.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f296d12eccc1601e69184ea3a6efcc43dbcd068846bf9a12934f6fbdeb19f83a
BLAKE2b-256 checksum
How to use checksums
15beb4b988bbd2f5082e993d80c4d6c492e767a28ad1b966665236fd01fe57f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.17.3 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/2.7.13

Release files / Flasik-0.5.1-py2-none-any.whl

Download URL Flasik-0.5.1-py2-none-any.whl
Size 199.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
3ebb9d1a5b7fdb5e0f6622ee29ac1c3c6ce43bf52ba003952f7fef0a76e077fe
BLAKE2b-256 checksum
How to use checksums
85b093bfe84a70959ceb0d9c7b316bee3efa1683299b5df179c4d0bb6cafa4e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.17.3 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/2.7.13

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page