Running Flask on Windows

Halo… Selamat Siang Pembaca.

Pada artikel ini kami akan menuliskan tutorial running flask pada sistem operasi Windows. Flask merupakan salah satu micro framework dalam bahasa Python untuk membuat aplikasi web. Seringnya developer menggunakan Flask untuk membuat web service.

Untuk menjalankan Flask diperlukan adanya virtual env. Oleh karena itu kita perlu meng-install modul virtualenv dan virtualenvwrapper-win.

Bagi pembaca yang telah menginstall software Anaconda, dapat membuka “Anaconda Prompt”

Sumber: https://docs.anaconda.com/anaconda/user-guide/getting-started/

Ketika script berikut pada Anaconda Prompt

pip install virtualenv 

pip install virtualenvwrapper-win

Setup Flask

Untuk menjalankan Flask, pembaca dapat mengikuti langkah-langkah berikut:

  1. Buka Window command prompt pada path project kita
  2. buatlah virtual environtment dengan mengetikkan perintah: mkvirtualenv <nama env>
  3. Buatlah folder project yang akan dijalankan: mkdir <nama project>
  4. Set folder tersebut menjadi folder project: setprojectdir
  5. Install Flask pada path project tersebut: pip install flask
  6. Anda sekarang dapat menuliskan kode python pada file .py dan jalankan dengan perintah: python namafile.py
  7. Kemudian buka browser dan ketikkan alamat host yang tertulis pada command prompt, defaultnya adalah http://127.0.0.1:5000/

Selamat Mencoba. Semoga Bermanfaat.

49 thoughts on “Running Flask on Windows

  1. Hi, I’m Marvin, Kopsen

    I am contacting you on behalf of Natural Apiary.
    Natural Apiary is offering an affiliate program that allows you to create links and earn referral fees when customer clicks through and buy products.
    It’s completely free to join and easy to use.

    Give your websites visitors the ease of referring them to a trusted site where they can purchase products you advertise.
    And when they do, you can earn up to 17% of their total purchase.

    Take advantage of Natural Apiary retail promotions and drive traffic and earn commissions.
    Click here: https://zeep.ly/hdWF7

    Kind Regards,

  2. NOT SATISFIED WITH YOUR HOSTING ?

    Check Out Our Coupons for This Month & Get Your Domain, Hosting and SSLs For Less!
    Namecheap Offers Amazing Deals That Save You Money Across Our Product Range!
    Best Value Web Products. 20 Years Serving You. Free WhoisGuard. #1 for Value Vs. Others.

    Check Out Our Coupons for This Month => http://bit.ly/Our_Current_Deals

  3. NOT SATISFIED WITH YOUR HOSTING ?

    Check Out Our Coupons for This Month & Get Your Domain, Hosting and SSLs For Less!
    Namecheap Offers Amazing Deals That Save You Money Across Our Product Range!
    Best Value Web Products. 20 Years Serving You. Free WhoisGuard. #1 for Value Vs. Others.

    Check Out Our Coupons for This Month => http://bit.ly/Our_Current_Deals

  4. YOU NEED FAST PROXY SERVERS ?

    Check it out this Anonymous and Private Proxy Servers.
    HTTP & SOCKS5 Proxy supported.
    IP Authentication or Password Authentication available.
    HERE: https://bit.ly/3ifZkmL

  5. YOU NEED FAST PROXY SERVERS ?

    Check it out this Anonymous and Private Proxy Servers.
    HTTP & SOCKS5 Proxy supported.
    IP Authentication or Password Authentication available.
    HERE: https://bit.ly/3ifZkmL

  6. Hello

    YOU NEED QUALITY VISITORS FOR YOUR: ittelkom-pwt.ac.id ?

    WE PROVIDE HIGH-QUALITY VISITORS WITH:
    – 100% safe for your site
    – real visitors with unique IPs. No bots, proxies, or datacenters
    – visitors from Search Engine (by keyword)
    – visitors from Social Media Sites (referrals)
    – visitors from any country you want (USA/UK/CA/EU…)
    – very low bounce rate
    – very long visit duration
    – multiple pages visited
    – tractable in google analytics
    – custom URL tracking provided
    – boost ranking in SERP, SEO, profit from CPM

    CLAIM YOUR 24 HOURS FREE TEST HERE=> ventfara@mail.com

    Thanks, Johnson Broomfield

  7. Hello

    YOU NEED HELP TO BUILD SEO LINKS FOR: ittelkom-pwt.ac.id ?

    I just checked out your website, and wanted to find out if you need help for SEO Link Building ?

    WE OFFER YOU THE BEST SEO STRATEGY FOR 2021.

    Build an unlimited number of Backlinks and increase Traffic to your websites which will lead to a higher number of customers and much more sales for you.

    If You Are Interested, I’m waiting for your response here => seosubmitter@mail.com

    Thanks, Fern Wrenn

  8. Hello

    YOU NEED HELP TO BUILD SEO LINKS FOR: ittelkom-pwt.ac.id ?

    I just checked out your website, and wanted to find out if you need help for SEO Link Building ?

    WE OFFER YOU THE BEST SEO STRATEGY FOR 2021.

    Build an unlimited number of Backlinks and increase Traffic to your websites which will lead to a higher number of customers and much more sales for you.

    If You Are Interested, I’m waiting for your response here => seosubmitter@mail.com

    Thanks, Mikel Hirth

  9. Hello

    YOU NEED QUALITY VISITORS FOR YOUR: ittelkom-pwt.ac.id ?

    WE PROVIDE HIGH-QUALITY VISITORS WITH:
    – 100% safe for your site
    – real visitors with unique IPs. No bots, proxies, or datacenters
    – visitors from Search Engine (by keyword)
    – visitors from Social Media Sites (referrals)
    – visitors from any country you want (USA/UK/CA/EU…)
    – very low bounce rate
    – very long visit duration
    – multiple pages visited
    – tractable in google analytics
    – custom URL tracking provided
    – boost ranking in SERP, SEO, profit from CPM

    CLAIM YOUR 24 HOURS FREE TEST HERE=> ventfara@mail.com

    Thanks, Delia Calvert

  10. I’ve learned new things out of your blog post. One other thing I have observed is that typically, FSBO sellers will probably reject an individual. Remember, they might prefer to not ever use your expert services. But if you maintain a stable, professional relationship, offering aid and keeping contact for about four to five weeks, you will usually have the ability to win a discussion. From there, a listing follows. Thanks

  11. I cherished as much as you’ll receive carried out right here. The sketch is tasteful, your authored subject matter stylish. nevertheless, you command get bought an shakiness over that you want be delivering the following. ill indubitably come more before once more since precisely the similar just about a lot incessantly within case you protect this increase.

  12. Hello

    YOU NEED FAST PROXY SERVERS ?

    Check it out this Anonymous and Private Proxy Servers.
    – HTTP & SOCKS5 Proxy supported.
    – IP Authentication or Password Authentication available.
    – MORE INFO HERE: https://zeep.ly/UotLg

    Thanks, Yvonne Hardiman
    If you no longer wish to hear from us, please reply this email.

  13. It’s The truth is a fantastic and valuable piece of knowledge. I’m satisfied that you just shared this helpful info with us. Make sure you keep us up-to-date like this. Thanks for sharing.

Leave a Reply

Your email address will not be published. Required fields are marked *