Python Classy Classes With Python Data Classes Python has well-known data holders. If you need a sequence, you can use a list. If you need an immutable sequence, use a tuple. If you need a homogeneous array, use the array module. If you need a hash table, a dictionary is likely what you want.
Data How to Generate Fake Data With Python Mimesis Generating fake data can be a task far beyond the infamous lorem ipsum. Mimesis, as describe by the library authors: "Is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages."Let's install Mimesis
Python Working With JSON in Python The implementation of JSON in Python is small and concise, and you can read its source code (written in Python) at Lib/json. Although similar looking, Python Dictionaries and JSON are quite different. Dictionaries are high-level Python Objects, while JSON is pure text. We
Django 5 Tools to Enhance Your Django Development Workflow Pytest-DjangoWith pytest-django, you can take advantage of pytest's ecosystem in your Django project seamlessly. Besides the better API, I especially like the --nomigrations flag because it allows running tests without migrating the database. Perfect for TDD. Also, Django's assertions are still available: from pytest_
Django Organizing Django and React with Yarn Workspaces Django and React can be daunting to put together. One recipe I like for monorepos is using Yarn workspaces. The folder structure provided by create-react-app encapsulates all the frontend, and it doesn't feel connected or aligned to the Django project. Workspaces allow organizing the
Python Changing the Default Debugger in Python Python comes with a built in debugger called pdb. You drop the line below at any part or your code, and a debugger will show up: import pdb; pdb.set_trace() Python 3.7 introduced the debugger() keyword, allowing you to simplify the code
Javascript Checking if an Object Exists in an Array The includes() method in JavaScript allows you to check if a value exists in an array. For primitive types, you can do: const primitiveArray = [1,2,3,4,5] primitiveArray.includes(3) > true You can also pass a second optional argument to includes(
Django Deep Dive into Django's Pagination When paginating with Django Paginators, the code is not just splitting the content on the UI, but it is trully querying the database in smaller chunks.
AWS AWS 101: How to Set Up Billing Alerts Free tiers are generous, but they can come to an end without you noticing.