Tag

python

Logging Events in Python

Learn how to log events in python using the logging library, and then create a small script to log info, warning and error events.

How to Save Dictionaries, Lists, Tuples and Other Objects With Pickle

Sometimes you just want to save a dictionary, a list, a string, or anything into a file so you can use it later. This can be easily achieved with the module Pickle. Warning: The pickle module is not secure against erroneous or maliciously constructed data. Never unpickle data received from

Develop and Publish Your Python Packages With Poetry

Learn how to develop packages using Poetry

How to Easily Use a Progress Bar in Python

A survey of Python progress bar libraries like Progress, ProgressBar2, TQDM, Click, and Clint that allow you to add animated progress bars to your command-line apps.

Change Flask Root Folder for Templates and Static Files

Today I was facing a problem, I didn't know how to change Flask root directory. Flask by default look for templates and static files under the root directory (/), how can we change that? Changing the root path Here's my directory structure: . ├── api_files │ ├── static │ │ └── style.css │ └── templates │ └── index.html ├── api.

Deploy a Flask Project to Heroku

I was suddenly in the need of deploying a very basic Flask API to the cloud, so it can be available to the public. The thing is, Flask is not made for a production and scalable environment, but if you only need to deploy a very basic web server to

Create Multiple Directories With Makedirs

You don’t need a bunch of if’s and else if’s to create an array of directories in python, just the good ol’ makedirs.

How to Handle a Deque in Python

Deques are a great way to handle memory efficient appends to a list-like object, it is a special module that allows you to handle list items in a more appropriate way.
You've successfully subscribed to coding(dose)
Great! Next, complete checkout to get full access to all premium content.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.