Serving files in current directory using Python http module

When developing backend in Python sometimes we need to easily share files on our development server. Let say we want your collegue to download some file.

Here is a standard python module http we can use for this purpose. To share files in current directory simply run this command

python3 -m http.server

Here I will show listing of my Django project. Output:

Serving HTTP on 0.0.0.0 port 8000 ...

Open browser on 0.0.0.0:8000

That’s it. Very simple.

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Starting Point Lab Machines

Integrating Prometheus with Grafana

Perjalanan gue menjadi Creator NFT

We have collected the TOP of the most Frequently Asked Questions about White Label.

Classification problem parsed as regression problem when Split Criterion is supplied to…

The story a sprint burndown chart told me

Adventures in Open Source

Step-by-Step instructions for using Azure AD with Splunk Phantom

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Privalov Vladimir

Privalov Vladimir

More from Medium

Assert Function in Python

Intro to Python SSH Client Paramiko

Pullup Exercise Counter in Python using mediapipe and GUI

Extending The Python Debugger