Anentropic

Projects on GitHub


(for Depop) github.com/depop/popget

popget

A simple no-bells-and-whistles REST-API client, optionally supporting async requests.

We use this at Depop for service-to-service calls in our heterogenous microservices environment.

Tested against Python 2.7 & 3.6, source is fully type-hinted and statically checked by mypy.

(for Depop) github.com/depop/celery-message-consumer

celery-message-consumer

Tool for using the bin/celery worker to consume vanilla AMQP messages (i.e. not Celery tasks). We chose to re-use this battle-tested consumer rather than write one from scratch.

Used at Depop for event-driven messaging in our heterogenous microservices environment.

Tested against Python 2.7 & 3.6, source is fully type-hinted and statically checked by mypy.

(for Depop) github.com/depop/python-flexisettings

flexisettings

Partly inspired by Django's from django.conf import settings settings object.

The goal is to allow shared libraries to be configured by a settings file in the project which imports them (like how Django libraries can expect the Django settings object to exist).

Tested against Python 2.7 & 3.6, source is fully type-hinted and statically checked by mypy.

(used by popget and celery-message-consumer)

(for Depop) github.com/depop/django-concurrent-test-helper

django-concurrent-test-helper

Helpers for executing Django app code concurrently within Django tests.

If you're using SQLite in your tests then this workaround is not needed. But at Depop we had a suite of integration tests running against actual Postgres and Mongo servers and this utility helped us to reproduce several race conditions and confirm when successfully fixed.

Tested against Python 2 & 3 and a wide range of Django versions.

factoryboy-gaendb

Factoryboy base factories and helpers for Google App Engine ndb models. To help with unit testing projects using App Engine datastore.

django-cas-cache

Django cache backends supporting CAS (compare-and-set) operation. Memcache, Redis and Dummy backends. CAS allows updating a value without risk of race condition bugs.

django-conditional-aggregates

Django aggregate functions which operate conditionally (i.e. generate SQL CASE statements) ...useful when combining aggregate functions with a GROUP BY clause. eg ConditionalSum.

For Django 1.5/1.6 only.
(From Django 1.8 onwards this feature is now provided by the Django ORM)

django-exclusivebooleanfield

Provides an ExclusiveBooleanField which is a boolean (database) field where only one row in the table (or optionally, a subset of rows based on value of other fields) is True and all the other rows are False.

django-tempocal

An extension of the Python stdlib's calendar.HTMLCalendar that makes use of Django templates to customise the output. After all, it's pretty lame having hard-coded HTML output.

dirtyebay

An eBay API client which respects XSD schema and talks SOAP, but doesn't use Suds. With a clean and simple interface and low memory usage (unlike Suds+WSDL...).