
python-tips Tag Posts Index
Explore on-chain topics from the Hive blockchain.
- →
[Python Tips] Are you still using Pip?
In a previous tip I talked about Virtual Environments and why you should be using them. While there are a few ways to do them, I want to talk more in-depth about
- →
[Python Tips] Easy serialization with Pickle
In computer science, in the context of data storage, serialization (or serialisation) is the process of translating data structures or object state into a format
- →
[Python Tips] Requests
Requests is a powerful and easy to use HTTP library for Python Need to get HTML data? Need to interact with an API? Requests can do that. While Python has a built-in
- →
[Python Tips] The New Walrus Operator
Walrus Operator The Walrus Operator is a new assignment operator announced in Python 3.8 that looks like a walrus. The walrus operator is used to simplify code when
- →
[Python Tips] Caching data with CacheTools
My Python Tips Series f-strings in Python 3.6 Underscores in numeric literals A better interactive shell Secrets Module - New in 3.6 PEP 8 Slices Named Tuples
- →
[Python Tips] Beyond print()
Beyond print() print() is a great quick and dirty way to log to the console in python. Even senior developers will use print() all the time. For anything more than
- →
[Python Tips] Apscheduler
Introducing Apscheduler Apscheduler is a job manager (similar to cron) to run sections of code on a schedule. I use it frequently to manage jobs that need to run
- →
[Python Tips] Knowing what exists
Being a good programmer isn't just about knowing how to do everything or even being very good at it. One of the most valuable skills of a good programmer is just
- →
[Python Tips] DRY Programming
This really isn't about Python directly, but it is an important topic every developer should know. DRY (Don't Repeat Yourself) is a popular programming concept of
- →
[Python Tips] Expiring Dict
Expiring Dict Expiring dict is a very useful library for caching data via ordered dictionaries. It works similar to a regular dictionary but will cache data for
- →
[Python Tips] Virtual Environments
Python Virtual Environment Most beginner developers have a hard time understanding virtual environments, why they are useful and how to use them. I am going to explain
- →
[Python Tips] Getting Help
There are a few handy functions built into Python to help the developer get more information about an object. help() If you want to get the documentation on an object
- →
[Python Tips] Jupyter Notebooks
This is probably my favorite tip to offer. If you haven't heard of Jupyter Notebooks, this is going to be a huge game changer for you. Source While I only use Jupyter
- →
[Python Tips] Type Annotation
Python is a dynamic language that does not require you to specify data types as you create variables or supply return types. This makes development a lot easier
- →
[Python Tips] Counter
Counter Counter is a collections object that keeps count of how many times similar values are found. Counter is part of the collections module and is a default package,
- →
[Python Tips] Destructuring
This is an easy tip, but an extremely useful feature of Python. Destructuring lists Let's take the following sample list: my_list = ['a', 'b','c'] I want to put
- →
[Python Tips] Named Tuples
What is a tuple? Tuples are very similar to lists, but it is unable to be changed (immutable). This provides a tiny performance and memory savings. More importantly
- →
[Python Tips] Slices
This isn't as much of a tip but a walkthrough on how to use slices and all the cool things you can do with them. Slices are a very powerful feature available to
- →
[Python Tips] PEP 8
PEP what? PEP 8 is a coding standard for Python by Guido van Rossum. It defines a set of guidelines for writing Python code in a universally accepted writing style.
- →
[Python Tips] Secrets Module - New in 3.6
Another new Python 3.6 feature is the addition of the secrets module, a replacement for random when generating cryptographically strong random numbers. When creating
Leave python-tips Tag Posts Index to discover