Script to update Python version for projects with pyenv & poetry
This script intended to be run for projects which,
- Has
.pyenv-version
file (Python version managed by pyenv) - Can be installed with
make install
(ormake install-api
)
#!/usr/bin/env python | |
# | |
# Rates calculator. | |
# | |
# Requirements | |
# ============ | |
# | |
# * `Python <http://www.python.org/>`_ 2.7 | |
# | |
# Installation |
#!/usr/bin/env python | |
import copy | |
import sys | |
import time | |
from argparse import ArgumentParser | |
from random import choice | |
from string import digits, letters |
#!/usr/bin/env python | |
# | |
# Import posts from Posterous backup to Blogger account. | |
# | |
# Requirements | |
# ============ | |
# | |
# * `Python <http://www.python.org/>` 2.6 or 2.7 | |
# * `GData <http://pypi.python.org/pypi/gdata>`_ 2.0.17 or higher | |
# |
import operator | |
def arange(start, stop=None, step=None): | |
""" | |
Implement range function not only for integers as Python's builtin | |
function, but for Decimals and floats as well. | |
Returns generator with arithmetic progession, not list. |
#!/bin/bash | |
# | |
# Check out available updates for virtual environment or system libraries with | |
# `pip <http://pip.pypa.org/>`_. | |
# | |
# Requirements | |
# ============ | |
# | |
# * GNU/Linux, Mac OS X | |
# * `pip`_ 1.4 or higher |
.PHONY: clean distclean install run | |
ENV ?= env | |
VENV = $(shell python -c "import sys; print(int(hasattr(sys, 'real_prefix')));") | |
ifeq ($(VENV),1) | |
GUNICORN = gunicorn | |
else | |
GUNICORN = $(ENV)/bin/gunicorn | |
endif |
#!/bin/bash | |
# | |
# Tiny shell script to run ``pip-check`` cmd inside of venv or fallback to | |
# global ``pip-check`` after. | |
# | |
# `pip-check <https://github.com/bartTC/pip-check/>`_ is a tool for checking | |
# outdated versions installed in your Python virtual environment or global | |
# site packages. | |
# | |
# Usage |
Script to update Python version for projects with pyenv & poetry
This script intended to be run for projects which,
.pyenv-version
file (Python version managed by pyenv)make install
(or make install-api
)#!/bin/bash | |
# | |
# Script to show list of dependencies for pre-commit hook. | |
# | |
# Requirements | |
# ============ | |
# | |
# - [curl](https://curl.haxx.se/) | |
# - [jq](https://stedolan.github.io/jq/) | |
# - [npm](https://www.npmjs.com/) |
[tool.black] | |
exclude = "^.*/migrations/.*$" | |
line_length = 79 | |
target_version = ["py37"] | |
[tool.poetry] | |
name = "project" | |
version = "1.0.0" | |
description = "Project" | |
authors = ["Team <team@googlegroups.com>"] |