Wednesday, June 23, 2021

Python Bytes: #239 No module named pythonbytes

<p><strong>Watch the live stream:</strong></p> <a href='https://www.youtube.com/watch?v=7ibdW3Posyg' style='font-weight: bold;'>Watch on YouTube</a><br> <br> <p><strong>About the show</strong></p> <p>Sponsored by <strong>us:</strong></p> <ul> <li>Check out the <a href="https://training.talkpython.fm/courses/all"><strong>courses over at Talk Python</strong></a></li> <li>And <a href="https://pytestbook.com"><strong>Brian’s book too</strong></a>!</li> </ul> <p>Special guest: <a href="https://twitter.com/Spirix3"><strong>Nick Muoh</strong></a></p> <p><strong>Brain #1:</strong> <a href="https://github.com/collerek/ormar">ormar : an async mini ORM for Python, with support for Postgres, MySQL, and SQLite.</a></p> <ul> <li>suggested by John Hagen</li> <li>From John: “It's a really cool ORM that combines Pydantic models and SQL models into a single definition. What is great about this, is it can be used to reduce repetitive duplication between Models for an ORM and the Pydantic Models that FastAPI needs to describe serialization. … If you have very pure-data heavy abstractions where your input and outputs through the API are roughly equivalent to your database, this helps you avoid needing to duplicate tons of SQLAlchemy classes and Pydantic that look identical and now you need to keep them in sync (DRY issue).”</li> </ul> <p><strong>Michael #2:</strong> <a href="https://twitter.com/garettmd/status/1405005338726834177"><strong>No module named</strong></a></p> <ul> <li>via <a href="https://twitter.com/garettmd/status/1405005338726834177">Garett Dunn</a></li> <li>Website: <a href="https://nomodulenamed.com/"><strong>nomodulenamed.com</strong></a></li> <li>Get an error like <code>Python Error: No module named dateutil</code>, maybe you need <code>pip install python_dateutil</code> (<a href="https://nomodulenamed.com/m/dateutil">reference</a>)</li> </ul> <p><strong>Nick #3:</strong> <a href="https://jupyterlite.readthedocs.io/en/latest/"><strong>JupyterLite</strong></a></p> <ul> <li><a href="https://github.com/jtpio">Jeremy Tuloup</a></li> <li>JupyterLite is a JupyterLab distribution that <strong>runs entirely in the browser</strong> built from the ground-up using JupyterLab components and extensions.</li> <li>Python kernel backed by <a href="https://pyodide.org/">Pyodide</a> running in a Web Worker</li> <li>Kernels include <ul> <li>Python 3.8 (pyolite implementation)</li> <li>Javascript</li> <li>P5.js</li> </ul></li> <li>Data is written to in-browser storage</li> <li>Data doesn’t leave the browser unless you are using extensions or use browser’s <code>fetch</code> API</li> </ul> <p><strong>Brian #4:</strong> <a href="https://nbviewer.jupyter.org/github/dylanjcastillo/random/blob/main/cheatsheet_data_viz_python.ipynb"><strong>Lot of plots</strong></a></p> <ul> <li>Dylan Castillo</li> <li>Side by side comparison of plots.</li> <li>with: pandas, matplotlib, seaborn, plotly.express</li> <li>plotting: line, grouped bars, stacked bars, area, pie/donut, histogram, scatter, and box</li> <li>Many plotting articles talk about cool stuff you can do with a particular library.</li> <li>This is nice in that they all can do these things, so you can <ul> <li>see the output of each and compare</li> <li>see the code that goes into making each, and see what style of api you might like to work with</li> </ul></li> </ul> <p><strong>Michael #5:</strong> <a href="https://github.com/davidlatwe/montydb"><strong>Monty, Mongo tinified. MongoDB implemented in Python</strong></a></p> <ul> <li>Monty, Mongo tinified. MongoDB implemented in Python</li> <li>Inspired by <a href="https://github.com/msiemens/tinydb">TinyDB</a> and it's extension <a href="https://github.com/schapman1974/tinymongo">TinyMongo</a></li> <li>A pure Python-implemented database that looks and works like <a href="https://www.mongodb.com/">MongoDB</a>.</li> <li>🦄 Available storage engines: <ul> <li>in-memory</li> <li>flat-file</li> <li>sqlite</li> <li>lmdb (lightning memory-mapped db)</li> </ul></li> <li><a href="https://github.com/davidlatwe/montydb#utilities"><strong>Tools and utilities like mongodump</strong></a>.</li> </ul> <p><strong>Nick #6:</strong> <a href="https://hakibenita.com/python-mypy-exhaustive-checking"><strong>Exhaustiveness Checking with Mypy</strong></a></p> <ul> <li><a href="https://hakibenita.com/pages/about">Haki Benita</a></li> <li><strong>Exhaustiveness checking</strong> is a common feature of type checkers where the type checker guarantees that the programmer has covered all cases.</li> <li>Using Mypy, you can be warned at compile time about missing cases that should be handled in your code.</li> <li>Works great when using Enums, Union Types, or Literals</li> <li>Mypy leverage a concept called “type narrowing” where the type of a variable becomes more and more confined based on the control flow of a program.</li> <li>Can be useful when using ModelChoices in Django.</li> </ul> <p><strong>Extras</strong></p> <p><strong>Michael</strong></p> <ul> <li><a href="https://3dlg-hcvc.github.io/plan2scene/"><strong>Plan2Scene</strong></a></li> <li><a href="https://open.spotify.com/episode/0ndeCY8nxsbcqRPCirAyMh"><strong>A new podcast interview about big picture Python on TCast</strong></a></li> </ul> <p><strong>Brian</strong></p> <ul> <li><a href="https://pragprog.com/titles/bopytest2/python-testing-with-pytest-second-edition/">Python Testing with pytest, 2nd edition</a> is in Beta 🎉 <ul> <li>eBook available during Beta, through Pragmatic</li> <li>Paperback available after Beta, “wherever fine books are sold”</li> </ul></li> </ul> <p><strong>Nick</strong></p> <ul> <li>Join us virtually at the Cleveland’s Python Meetup <a href="https://www.clepy.org/">CLEpy</a></li> <li>Registration for <a href="https://www.pyohio.org/2021/">PyOhio 2021</a> is open and the national conference begins July 31 (We have cool T-Shirts)</li> </ul> <p><strong>Joke</strong> </p> <p><strong>Rootbeer float</strong></p> <ul> <li>A programmer walks into a bar...</li> <li>He orders 1.000000119 root beers.</li> <li>The bartender says, “ I’m gonna have to charge you extra, that’s a root beer float.”</li> <li>The programmer says, “Well in that case make it a double.”</li> </ul> <p><strong>It Haunts Us</strong></p> <p><img src="https://ift.tt/3gY2egM" alt="It haunts us | CommitStrip" /></p> <p>How much does a chimney cost? It's free, it's on the house.</p>

from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...