• Stars
    star
    250
  • Rank 162,397 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 8 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

decorating: Literally decorating your terminal with decorators

Decorating: A Meta Repo To Decorators

Build Status codecov Requirements Status PyPi version PyPI pyversions PyPI status HitCount

Abstract

This project encourages an exploration into the limits of decorators in Python. While decorators might by new to beginners, they are an extremely useful feature of the language. They can be similar to Lisp Macros, but without changes to the AST. Great decorators from this packages are @animated and @writing. This repository is made from scratch, just using Python's Standard Library, no dependency!

Examples

Animated

Using as decorator and mixed with context-managers animation

Using with nested context-managers context-manager

Writing

Another project mine called MAL uses the decorating package —- basically a command line interface for MyAnimeList. The decorator @writing can be used by just adding 3 lines of code! The behavior is a retro typing-like computer. Check out the awesome effect:

asciicast

More examples are covered on my personal blog post about decorating.

Decorators & Usage

Currently public decorators on the API of decorators decorating:

  • decorating.debug
  • decorating.cache
  • decorating.counter
  • decorating.count_time
  • decorating.animated
  • decorating.writing

Mostly decorators has a pretty consistent usage, but for now only animated and writing has support to use as contextmanagers using the with syntax.

Installation

Supported Python versions:

  • Python3.4+
  • Python2.7

You can install the last release on PyPI by calling:

pip install --user decorating

If you want get the last development version install directly by the git repository:

pip install --user git+https://www.github.com/ryukinix/decorating

We have a published package on Arch Linux,which you can install using your favorite AUR Helper, like pacaur or yaourt:

yaourt -S python-decorating

Though since the version 0.6 we have support for Python2.7, an AUR package for Python2 was not made yet. Fill a issue if you have interest on that :). Thanks to Maxim Kuznetsov which implemented the necessary changes to make compatible with Python2!

License

PyPi License

MIT

Because good things need to be free.

More Repositories

1

lisp-chat

An experimental minimal chat written in Common Lisp
Common Lisp
169
star
2

mal

MAL: A MyAnimeList Command Line Interface [BROKEN: BLAME MyAnimeList]
Python
107
star
3

discrete-mathematics

A computational way to study discrete mathematics using Haskell
Haskell
55
star
4

lisp-inference

An Inference Engine based on Propositional Calculus written in Common Lisp
Common Lisp
38
star
5

fractal-plan

An animation using geometric plan! How we do beautiful and psychedelic things?
Python
32
star
6

tetris

A simple tetris made in Unity
C#
24
star
7

trivial-snake

A trivial snake game written in Common Lisp built on top of trivial-gamekit
Common Lisp
21
star
8

dotfiles

These are my dotfiles. All the config stuff that I use is here.
Common Lisp
15
star
9

lisp-insights

A personal repository of notes about learning lisp patterns
Common Lisp
13
star
10

leraxandria

A personal collection of functions, macros and programs written in Common Lisp
Common Lisp
13
star
11

keybase-hacking

Cracking system to recover my corrupted paper key
Python
9
star
12

cpp-journey

My personal notes/codes about the infernal adventure to learn C++ from HackerRank [pt-br]
C++
9
star
13

audio-effects-matlab

A set of audio effects for audio processing: delay, flanger and distortion. Project of a college course.
MATLAB
9
star
14

c-lists

Data Structures in C: Linked Lists
C
8
star
15

data-structures-ufc

Data Structures at UFC 2017.2
C
8
star
16

adventofcode

Go
7
star
17

lisp-challenge

A personal collection of Common Lisp scripts to solve the problems from www.pythonchallenge.com
Common Lisp
6
star
18

pic-tetris

Tetris Implementation for PIC18F4550
C
6
star
19

emacsd-lite

Lite emacs one file config with sane defaults and fast startup
Emacs Lisp
6
star
20

ant-walking

A stochastic simulation of an ant walking | A college project for the discipline Probability & Statistics
Python
6
star
21

conway-rs

Conway's Game of Life implementation in Rust
Rust
6
star
22

docker-lerax

A lerax-compliant environment docker image
Dockerfile
6
star
23

mr-bolinha

Um jogo que fiz com meus sobrinhos em Common Lisp: Mr Bolinha
Common Lisp
5
star
24

labyrinth-explorer

Random labyrinth maker with visual exploring using Pygame
Python
4
star
25

resume

My academic and professional resume
4
star
26

pysnake-two

Simple classic snake game for two players made with python + pygame
Python
4
star
27

haskell-rank

My solutions of HackerRank written in Haskell
Haskell
4
star
28

mir

mir (Manoel IR): A Remote Controller IR for my personal computer desktop
Python
4
star
29

rentalcar

A software for managing the business of car rentals written in Python. For a college course.
Python
4
star
30

spam-detector

A spam-detector classifier using Naive Bayes
Python
4
star
31

warsaw-openrc

Warsaw Banking Security software known as CaaS (Cancer as a Service) by GAS modified to working fine with OpenRC
Shell
4
star
32

python-chat

Python Chat: A Messaging Protocol over TCP Sockets
Python
4
star
33

lisp-koans-answers

Answers of repository www.github.com/google/lisp-koans
Common Lisp
4
star
34

sqrt-aprox

Numerical solutions using Taylor series to evaluate f(x) = sqrt(x)
C
3
star
35

tree-struct

Implementations of algorithms for tree structures
C
3
star
36

8bit-letter

A prototype of a 8bit letter.
Python
3
star
37

xboxdrv-bin

A PreCompiled xboxdrv PKGBUILD with batteries: Playstation2 config + OpenRC script
Roff
3
star
38

linked-list

Garbage + CancerPlusPlus
C++
2
star
39

ahmes-asm

An assembler for the ISA of the hypothetical machine Ahmes
C
2
star
40

xim

Xim the xi editor frontend terminal minimalist project mirror
Rust
2
star
41

tcc

Segmentação Semi-Supervisionada de Imagens através de Dinâmicas Coletivas em Redes Complexas
TeX
2
star
42

sorting-vector

Some codes of sort algorithm and complexity of algorithms.
C
1
star
43

cconway

A Conway Game of Life implementation written in C using SDL2
C
1
star
44

work-at-olist-test

Employee application at Olist: https://github.com/olist/work-at-olist
Python
1
star
45

symbolic-deriv

Symbolic Differentiation written in Racket
Racket
1
star
46

wps-office-stable

Personal PKGBUILD for a reliable WPS Office build
Shell
1
star
47

egsis

EGSIS: Exploratory Graph-based Semi-supervised Image Segmentation
Jupyter Notebook
1
star
48

ryukinix.github.io

My personal blog, portofolio and where I write about my projects
HTML
1
star
49

pyzumbi-amazon

Python
1
star
50

scala-impatient

My solutions for the exercises of Scala For The Impatient Ed2 (2016) book
Scala
1
star
51

exit-joystick

Simple SDL2 application to wait from joystick press event and exit, to be used at raspberry pi 3 b+
C++
1
star
52

clap-counter

A Clap Counter as a Service written in Haskell
Haskell
1
star
53

artix-news

Artix's news CLI. Give to you a fast summary of the new artix changes [NOT MAINTAINED]
Python
1
star
54

programming-techniques-ufc

A course about Java, Python and Programming Projects at Federal University of Ceará (UFC) on Computer Engineering course.
Java
1
star
55

osa

OSA Real-Time Operating System (mirror)
C
1
star