I’m working on an online shop for our local hackerspace Coredump. To implement it, we chose django-oscar because I already know how to deal with Django and because it seems to be very customizeable. In the docs it is mentioned that every shop needs a product class and a fulfillment partner. The proper way to […]
Python Multithreading Tutorial: Concurrency and Parallelism
Threading is just one of the many ways concurrent programs can be built. In this article, we will take a look at threading and a couple of other strategies in building concurrent programs in Python, as well as discuss how each is suitable in different scenarios.
Properly Defining SerializerMethodFields in DRF
I’m currently implementing a RESTful API with Django Rest Framework (a fantastic framework by the way). I’m mostly depending on the automatic serialization that a ModelSerializer provides. class ReportSerializer(serializers.ModelSerializer): class Meta: model = models.Report fields = (‘id’, ‘name’) But sometimes you need extra fields. In my case I wanted to add a readonly image_url field […]
Python + Elasticsearch. First steps.
Lately, here at Tryolabs, we started gaining interest in big data and search related platforms which are giving us excellent resources to create our complex web applications. One of them is Elasticsearch. Elastic{ON}15, the first ES conference is coming, and since nowadays we see a lot of interest in this technology, we are taking the opportunity to give […]
Asynchronous Python and Databases
The asynchronous programming topic is difficult to cover. These days, it’s not just about one thing, and I’m mostly an outsider to it. However, because I deal a lot with relational databases and the Python stack’s interaction with them, I have to field a lot of questions and issues regarding asynchronous IO and database programming, […]
Hyper: The State of the Union
It’s been a few months since I last spoke about hyper. The reason I’ve been so quiet is primarily because not much progress has been made on the project. I’ve been swamped with other projects (most notably Project Calico), and that’s limited my ability to make much forward progress. However, in the last few weeks […]
New Django Website
After a series of Django gigs in 2014, I had the urge to redevelop our company website in Django; I am very happy with the results. This overview is roughly in order of development from start to finish. And since I am a “packaging guy”, I will take this opportunity to comment on miscellaneous packaging […]
Migrating from django-social-auth to python-social-auth
I recently ported an app with Google OAuth2 integration from django-social-auth to python-social-auth. Here are some things I noticed that were not mentioned in the porting docs. (Note: In the following text I will refer to django-social-auth and python-social-auth as DSA and PSA in order to keep my typing sanity.) Migrating Database Last week I […]
Oportunidade para Programador Python / Data Scientist na Catho
Você gosta de trabalhar com inteligência aplicada? Não tem medo de aprender novas tecnologias? Venha trabalhar conosco! A equipe de Inovação da Catho procura por alguém com paixão por conhecimento e espírito inovador. Nosso foco é produzir novas tecnologias que irão ajudar pessoas a encontrarem as melhores vagas e empresas a encontrarem os melhores […]
Revamping My Projects Page with Nikola
A week ago, I was inspired to produce a new projects page for myself. The previous one was a trainwreck with a lot of hacks. Also hosted on GitHub Pages for some reason. So, considering I’m so invested in Nikola already, I produced the projectpages plugin and also made it publicly available. The plugin produces […]
Pillow Runs Itself
As of Pillow 2.6.0, the Pillow project almost completely runs itself! Of course when I say “runs itself” I mean “runs without me”, which is what every open source project lead hopes for. For the first time ever, I was able to: Turn off GitHub Watching until two weeks before the release. Not run setup.py […]
A Fresh Look at Rust
I have been programming with Rust for quite a long time now but that does not mean much. Rust has been changing for years now in such dramatic ways that coming back after two months feels almost like working in a different language. One thing however never changed: the trajectory. With every update, with every […]
psutil 2.1.2: python wheels
psutil 2.1.2 is out. This release has been cooking for a while now, and that’s because I’ve been travelling for the past 3 months between Spain, Japan and Germany. Hopefully I will be staying in Berlin for a while now, so I will have more time to dedicate to the project. The main new “feature” […]
Python Apps the Right Way: entry points and scripts
There are multiple ways to write an app in Python. However, not all of them provide your users with the best experience. One of the problems some people encounter is writing launch scripts. The best way to handle this is the Entry Points mechanism of Setuptools, and a __main__.py file. It’s quite easy to implement. […]
Profiling Pytest Tests
If you want to run a profiler over your pytest cases (including underlying code), the easiest way is to run pytest directly using cPython: python -m cProfile -o profile $(which py.test) You can even pass in optional arguments: python -m cProfile -o profile $(which py.test) tests/worker/test_tasks.py -s campaigns This will create a binary file called […]