Notes and anecdotes

Techstuff rambling

Adding a python API handler with serverless

Create an AWS Lambda function with Python3 and integrate with S3? Simple if you know how (though getting there is a bitch, I bet Amazon does this on purpose as a way to trick developers in on their certification-ride). I found how, copy-paste below.

Django on Heroku with AWS S3 bucket for static and media files

Case: You want efficient collectstatic and serving of files You want static files and media files to be hosted on an AWS S3 bucket. (optional) You have too many files for “normal” collectstatic to be efficient. (optional) You have a non-US S3 bucket. (optional) You use Heroku Disclaimer: Have not tested with python 2.7, can’t…

Continue Reading

No module named ‘_sqlite3’

TLDR: Try sudo apt-get install python-dev sudo apt-get install libsqlite3-dev And recompile python (see own post) Long version So, I was starting a django app (1.7.1 with Python 3.4), python manage.py migrate when i encountered django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named ‘_sqlite3’ Did not expect this. I have…

Continue Reading

pip on python3: Can’t decompress data; zlib not available

Getting pip3.4 to work Want Python3.4 on your debian with virtualenv and pip? That’s what I wanted. However, I didn’t get pip automatically, and when I tried to install it, python gave me “Can’t decompress data; zlib not available” Spent a whole lot of time on this. Seems like installing 3.4 properly (with –with-zlib parameter when configuring) makes…

Continue Reading