Skip to main content

Uma biblioteca Python para manter vivas as piadas ruins do Mota.

Project description

mota-jokes

Uma biblioteca Python para honrar uma tradição importante: as piadas ruins do Mota.

O pacote é instalado como mota-jokes, mas o import fica como mota. A ideia é simples: transformar o folclore interno de um amigo que insiste em manter o meme vivo numa API Python publicável, testável e completamente desnecessária.

Ele tem dois módulos de primeira classe:

  • mota.jokes: acervo e motor de piadas ruins.
  • mota.php: utilidades PHP emocionalmente duvidosas.
from mota import jokes, php

print(jokes.tell("direito"))
print(php.composer_install("mota/bom-senso"))

Instalação

python -m pip install mota-jokes

Para desenvolvimento local:

python -m pip install -e .

Linha de comando

Depois de instalar:

python -m mota
python -m mota jokes direito
python -m mota jokes --search python
python -m mota php
python -m mota php framework
python -m mota php composer mota/bom-senso

Se o diretório de scripts do Python estiver no PATH, o comando mota também fica disponível diretamente:

mota jokes direito

Uso em Python

from mota import jokes, php

print(jokes.random())
print(jokes.explain("direito"))
print(php.echo())

API rápida

jokes.all()
jokes.random()
jokes.by_id("direito")
jokes.tell("direito")
jokes.search("python")
jokes.explain("php")
jokes.audit()
jokes.cringe_index()

php.echo()
php.is_php("Python")
php.translate("print('olá')")
php.framework()
php.ini_get("display_errors")
php.semicolon("$mota = 'meme'")
php.composer_install("mota/humor")

Exemplo canônico

from mota import jokes

print(jokes.tell("direito"))

Saída:

Nossa, bicho, já pensou em fazer Direito?
Por quê, tô fazendo errado?

Publicação no PyPI

O nome mota já existe no PyPI, então este projeto usa mota-jokes como nome de distribuição. Isso não afeta o import:

pip install mota-jokes
from mota import jokes, php

Para publicar uma nova versão:

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*

Antes de publicar, lembre-se de incrementar a versão em pyproject.toml e src/mota/__init__.py, porque o PyPI não permite reenviar a mesma versão.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mota_jokes-0.1.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mota_jokes-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file mota_jokes-0.1.1.tar.gz.

File metadata

  • Download URL: mota_jokes-0.1.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for mota_jokes-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0bd52e18f21b2f0cd959feaac669472a5077fa52197009e356a34492b733cb3e
MD5 a28de17a534e9e55d4c5dd9cc1d0f7d5
BLAKE2b-256 cab235d495cbe452165646ed309b1da652a01762ca4e590ee3bb7e0945115bab

See more details on using hashes here.

File details

Details for the file mota_jokes-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mota_jokes-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for mota_jokes-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eaad112922d45780a234682f7734a054b21cef689c0acc3b861a95eba8f8b15c
MD5 c8fd7f73c511504f1e5b3239d15ec972
BLAKE2b-256 e8742385972a41939d643fd78638746890ef2225db071bebec23f7bc56eb8733

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page