├── .gitignore ├── CNAME ├── LICENSE ├── README.md ├── _config.yml ├── audio_fft ├── .gitignore ├── README.md ├── README.pdf ├── analisador.py ├── bola.wav ├── carro.wav ├── entrada.wav ├── entrada_sem_nada.wav ├── im2.png ├── im3.png ├── imagem.png ├── praia.wav ├── reconhecimento_voz.png └── requirements.txt ├── backend.png ├── banner_livros2.png ├── bhaskara.py ├── bigdata ├── README.md ├── medicoes.csv └── spark_avg1.py ├── clientes_servidores ├── README.md └── requests_flask.png ├── curso ├── exemplos │ └── teaser │ │ └── wtf.py ├── licao1 │ └── curso-python-cleuton-licao1.pdf ├── licao2 │ └── curso-python-cleuton-licao2.pdf ├── licao3 │ ├── correção │ │ └── calc.py │ └── curso-python-cleuton-licao3.pdf ├── licao4 │ ├── correção │ │ ├── fatorar.py │ │ └── util │ │ │ ├── __init__.py │ │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ └── primo.cpython-37.pyc │ │ │ └── primo.py │ ├── curso-python-cleuton-licao4.pdf │ ├── escopo.py │ ├── geom.py │ ├── geom_lib.py │ ├── jogo.py │ ├── jogo_novo.py │ ├── jogo_pasta.py │ ├── utils │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── __init__.cpython-37.pyc │ │ │ └── geom_lib.cpython-37.pyc │ │ └── geom_lib.py │ └── vglobal.py ├── licao5 │ ├── arqexception.py │ ├── cria.py │ ├── cria2.py │ ├── cria3.py │ ├── curso-python-cleuton-licao5.pdf │ ├── except.py │ ├── jsongrava.py │ ├── jsonler.py │ ├── le.py │ ├── ler3.py │ ├── ler4.py │ ├── saida.json │ ├── semexcept.1.py │ ├── semexcept.py │ ├── sql1.py │ ├── sql2.py │ └── sql3.py └── licao6 │ ├── carro.py │ ├── carro_1.py │ ├── carro_2.py │ ├── carro_3.py │ ├── carro_4.py │ ├── curso-python-cleuton-licao6.pdf │ ├── dunders.py │ ├── poly.py │ ├── veiculo.py │ ├── veiculo2.py │ └── veiculo3.py ├── image_analizer ├── README.md ├── README.pdf ├── ia.py ├── imagens │ ├── .DS_Store │ ├── ia.jpg │ ├── ia2.jpg │ ├── im1.jpg │ ├── im10.jpg │ ├── im11.jpg │ ├── im12.jpg │ ├── im13.jpg │ ├── im14.jpg │ ├── im15.jpg │ ├── im16.jpg │ ├── im17.jpg │ ├── im18.jpg │ ├── im19.jpg │ ├── im2.jpg │ ├── im20.jpg │ ├── im21.jpg │ ├── im22.jpg │ ├── im3.jpg │ ├── im4.jpg │ ├── im5.jpg │ ├── im6.jpg │ ├── im7.jpg │ ├── im8.jpg │ ├── im9.jpg │ ├── real.jpg │ └── real2.jpg ├── real_fake.png └── requirements.txt ├── logo.png ├── maze ├── README.md ├── maze.png ├── maze.py ├── model │ ├── __init__.py │ ├── celula.py │ ├── constantes.py │ ├── labirinto.py │ └── stack.py ├── requirements.txt ├── robo-sensores-IMU.jpg └── solver.py ├── modulos_imports ├── README.md ├── __pycache__ │ └── puro.cpython-36.pyc ├── bhaskara.png ├── calculador.py ├── cdelta.py ├── coeficientes.py ├── importado.py ├── puro.py └── raizes.py ├── new.png ├── packages ├── README.md ├── __pycache__ │ ├── a.cpython-36.pyc │ ├── coeficientes.cpython-36.pyc │ └── procura.cpython-36.pyc ├── a.py ├── bdir │ ├── __pycache__ │ │ └── b.cpython-36.pyc │ └── b.py ├── bhaskara │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── cdelta.cpython-36.pyc │ │ └── raizes.cpython-36.pyc │ ├── cdelta.py │ └── raizes.py ├── calculador.py ├── coeficientes.py └── procura.py ├── python-drops.png ├── python_gil ├── README.md ├── java │ ├── pom.xml │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── obomprogramador │ │ │ └── multi │ │ │ └── Fibo.java │ └── target │ │ └── classes │ │ └── com │ │ └── obomprogramador │ │ └── multi │ │ ├── CallableFibo.class │ │ ├── FibCalc.class │ │ ├── Fibo.class │ │ └── Resultado.class └── python │ ├── thread_fibo.py │ ├── utils │ ├── __pycache__ │ │ └── timer.cpython-37.pyc │ └── timer.py │ └── worker_fibo.py ├── restful_python ├── .venv │ ├── bin │ │ ├── Activate.ps1 │ │ ├── activate │ │ ├── activate.csh │ │ ├── activate.fish │ │ ├── flask │ │ ├── gunicorn │ │ ├── pip │ │ ├── pip3 │ │ ├── pip3.12 │ │ ├── python │ │ ├── python3 │ │ └── python3.12 │ ├── lib │ │ └── python3.12 │ │ │ └── site-packages │ │ │ ├── MarkupSafe-3.0.2.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE.txt │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ ├── WHEEL │ │ │ └── top_level.txt │ │ │ ├── blinker-1.9.0.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE.txt │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ └── WHEEL │ │ │ ├── blinker │ │ │ ├── __init__.py │ │ │ ├── _utilities.py │ │ │ ├── base.py │ │ │ └── py.typed │ │ │ ├── click-8.1.8.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE.txt │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ └── WHEEL │ │ │ ├── click │ │ │ ├── __init__.py │ │ │ ├── _compat.py │ │ │ ├── _termui_impl.py │ │ │ ├── _textwrap.py │ │ │ ├── _winconsole.py │ │ │ ├── core.py │ │ │ ├── decorators.py │ │ │ ├── exceptions.py │ │ │ ├── formatting.py │ │ │ ├── globals.py │ │ │ ├── parser.py │ │ │ ├── py.typed │ │ │ ├── shell_completion.py │ │ │ ├── termui.py │ │ │ ├── testing.py │ │ │ ├── types.py │ │ │ └── utils.py │ │ │ ├── flask-3.1.0.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE.txt │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ ├── REQUESTED │ │ │ ├── WHEEL │ │ │ └── entry_points.txt │ │ │ ├── flask │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── app.py │ │ │ ├── blueprints.py │ │ │ ├── cli.py │ │ │ ├── config.py │ │ │ ├── ctx.py │ │ │ ├── debughelpers.py │ │ │ ├── globals.py │ │ │ ├── helpers.py │ │ │ ├── json │ │ │ │ ├── __init__.py │ │ │ │ ├── provider.py │ │ │ │ └── tag.py │ │ │ ├── logging.py │ │ │ ├── py.typed │ │ │ ├── sansio │ │ │ │ ├── README.md │ │ │ │ ├── app.py │ │ │ │ ├── blueprints.py │ │ │ │ └── scaffold.py │ │ │ ├── sessions.py │ │ │ ├── signals.py │ │ │ ├── templating.py │ │ │ ├── testing.py │ │ │ ├── typing.py │ │ │ ├── views.py │ │ │ └── wrappers.py │ │ │ ├── gunicorn-23.0.0.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ ├── REQUESTED │ │ │ ├── WHEEL │ │ │ ├── entry_points.txt │ │ │ └── top_level.txt │ │ │ ├── gunicorn │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── app │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── pasterapp.py │ │ │ │ └── wsgiapp.py │ │ │ ├── arbiter.py │ │ │ ├── config.py │ │ │ ├── debug.py │ │ │ ├── errors.py │ │ │ ├── glogging.py │ │ │ ├── http │ │ │ │ ├── __init__.py │ │ │ │ ├── body.py │ │ │ │ ├── errors.py │ │ │ │ ├── message.py │ │ │ │ ├── parser.py │ │ │ │ ├── unreader.py │ │ │ │ └── wsgi.py │ │ │ ├── instrument │ │ │ │ ├── __init__.py │ │ │ │ └── statsd.py │ │ │ ├── pidfile.py │ │ │ ├── reloader.py │ │ │ ├── sock.py │ │ │ ├── systemd.py │ │ │ ├── util.py │ │ │ └── workers │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── base_async.py │ │ │ │ ├── geventlet.py │ │ │ │ ├── ggevent.py │ │ │ │ ├── gthread.py │ │ │ │ ├── gtornado.py │ │ │ │ ├── sync.py │ │ │ │ └── workertmp.py │ │ │ ├── itsdangerous-2.2.0.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE.txt │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ └── WHEEL │ │ │ ├── itsdangerous │ │ │ ├── __init__.py │ │ │ ├── _json.py │ │ │ ├── encoding.py │ │ │ ├── exc.py │ │ │ ├── py.typed │ │ │ ├── serializer.py │ │ │ ├── signer.py │ │ │ ├── timed.py │ │ │ └── url_safe.py │ │ │ ├── jinja2-3.1.5.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE.txt │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ ├── WHEEL │ │ │ └── entry_points.txt │ │ │ ├── jinja2 │ │ │ ├── __init__.py │ │ │ ├── _identifier.py │ │ │ ├── async_utils.py │ │ │ ├── bccache.py │ │ │ ├── compiler.py │ │ │ ├── constants.py │ │ │ ├── debug.py │ │ │ ├── defaults.py │ │ │ ├── environment.py │ │ │ ├── exceptions.py │ │ │ ├── ext.py │ │ │ ├── filters.py │ │ │ ├── idtracking.py │ │ │ ├── lexer.py │ │ │ ├── loaders.py │ │ │ ├── meta.py │ │ │ ├── nativetypes.py │ │ │ ├── nodes.py │ │ │ ├── optimizer.py │ │ │ ├── parser.py │ │ │ ├── py.typed │ │ │ ├── runtime.py │ │ │ ├── sandbox.py │ │ │ ├── tests.py │ │ │ ├── utils.py │ │ │ └── visitor.py │ │ │ ├── markupsafe │ │ │ ├── __init__.py │ │ │ ├── _native.py │ │ │ ├── _speedups.c │ │ │ ├── _speedups.cpython-312-x86_64-linux-gnu.so │ │ │ ├── _speedups.pyi │ │ │ └── py.typed │ │ │ ├── packaging-24.2.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE │ │ │ ├── LICENSE.APACHE │ │ │ ├── LICENSE.BSD │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ └── WHEEL │ │ │ ├── packaging │ │ │ ├── __init__.py │ │ │ ├── _elffile.py │ │ │ ├── _manylinux.py │ │ │ ├── _musllinux.py │ │ │ ├── _parser.py │ │ │ ├── _structures.py │ │ │ ├── _tokenizer.py │ │ │ ├── licenses │ │ │ │ ├── __init__.py │ │ │ │ └── _spdx.py │ │ │ ├── markers.py │ │ │ ├── metadata.py │ │ │ ├── py.typed │ │ │ ├── requirements.py │ │ │ ├── specifiers.py │ │ │ ├── tags.py │ │ │ ├── utils.py │ │ │ └── version.py │ │ │ ├── pip-24.0.dist-info │ │ │ ├── AUTHORS.txt │ │ │ ├── INSTALLER │ │ │ ├── LICENSE.txt │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ ├── REQUESTED │ │ │ ├── WHEEL │ │ │ ├── entry_points.txt │ │ │ └── top_level.txt │ │ │ ├── pip │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── __pip-runner__.py │ │ │ ├── _internal │ │ │ │ ├── __init__.py │ │ │ │ ├── build_env.py │ │ │ │ ├── cache.py │ │ │ │ ├── cli │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── autocompletion.py │ │ │ │ │ ├── base_command.py │ │ │ │ │ ├── cmdoptions.py │ │ │ │ │ ├── command_context.py │ │ │ │ │ ├── main.py │ │ │ │ │ ├── main_parser.py │ │ │ │ │ ├── parser.py │ │ │ │ │ ├── progress_bars.py │ │ │ │ │ ├── req_command.py │ │ │ │ │ ├── spinners.py │ │ │ │ │ └── status_codes.py │ │ │ │ ├── commands │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── cache.py │ │ │ │ │ ├── check.py │ │ │ │ │ ├── completion.py │ │ │ │ │ ├── configuration.py │ │ │ │ │ ├── debug.py │ │ │ │ │ ├── download.py │ │ │ │ │ ├── freeze.py │ │ │ │ │ ├── hash.py │ │ │ │ │ ├── help.py │ │ │ │ │ ├── index.py │ │ │ │ │ ├── inspect.py │ │ │ │ │ ├── install.py │ │ │ │ │ ├── list.py │ │ │ │ │ ├── search.py │ │ │ │ │ ├── show.py │ │ │ │ │ ├── uninstall.py │ │ │ │ │ └── wheel.py │ │ │ │ ├── configuration.py │ │ │ │ ├── distributions │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── installed.py │ │ │ │ │ ├── sdist.py │ │ │ │ │ └── wheel.py │ │ │ │ ├── exceptions.py │ │ │ │ ├── index │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── collector.py │ │ │ │ │ ├── package_finder.py │ │ │ │ │ └── sources.py │ │ │ │ ├── locations │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _distutils.py │ │ │ │ │ ├── _sysconfig.py │ │ │ │ │ └── base.py │ │ │ │ ├── main.py │ │ │ │ ├── metadata │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _json.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── importlib │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── _compat.py │ │ │ │ │ │ ├── _dists.py │ │ │ │ │ │ └── _envs.py │ │ │ │ │ └── pkg_resources.py │ │ │ │ ├── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── candidate.py │ │ │ │ │ ├── direct_url.py │ │ │ │ │ ├── format_control.py │ │ │ │ │ ├── index.py │ │ │ │ │ ├── installation_report.py │ │ │ │ │ ├── link.py │ │ │ │ │ ├── scheme.py │ │ │ │ │ ├── search_scope.py │ │ │ │ │ ├── selection_prefs.py │ │ │ │ │ ├── target_python.py │ │ │ │ │ └── wheel.py │ │ │ │ ├── network │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── auth.py │ │ │ │ │ ├── cache.py │ │ │ │ │ ├── download.py │ │ │ │ │ ├── lazy_wheel.py │ │ │ │ │ ├── session.py │ │ │ │ │ ├── utils.py │ │ │ │ │ └── xmlrpc.py │ │ │ │ ├── operations │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── build │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── build_tracker.py │ │ │ │ │ │ ├── metadata.py │ │ │ │ │ │ ├── metadata_editable.py │ │ │ │ │ │ ├── metadata_legacy.py │ │ │ │ │ │ ├── wheel.py │ │ │ │ │ │ ├── wheel_editable.py │ │ │ │ │ │ └── wheel_legacy.py │ │ │ │ │ ├── check.py │ │ │ │ │ ├── freeze.py │ │ │ │ │ ├── install │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── editable_legacy.py │ │ │ │ │ │ └── wheel.py │ │ │ │ │ └── prepare.py │ │ │ │ ├── pyproject.py │ │ │ │ ├── req │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── constructors.py │ │ │ │ │ ├── req_file.py │ │ │ │ │ ├── req_install.py │ │ │ │ │ ├── req_set.py │ │ │ │ │ └── req_uninstall.py │ │ │ │ ├── resolution │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── legacy │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── resolver.py │ │ │ │ │ └── resolvelib │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── base.py │ │ │ │ │ │ ├── candidates.py │ │ │ │ │ │ ├── factory.py │ │ │ │ │ │ ├── found_candidates.py │ │ │ │ │ │ ├── provider.py │ │ │ │ │ │ ├── reporter.py │ │ │ │ │ │ ├── requirements.py │ │ │ │ │ │ └── resolver.py │ │ │ │ ├── self_outdated_check.py │ │ │ │ ├── utils │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _jaraco_text.py │ │ │ │ │ ├── _log.py │ │ │ │ │ ├── appdirs.py │ │ │ │ │ ├── compat.py │ │ │ │ │ ├── compatibility_tags.py │ │ │ │ │ ├── datetime.py │ │ │ │ │ ├── deprecation.py │ │ │ │ │ ├── direct_url_helpers.py │ │ │ │ │ ├── egg_link.py │ │ │ │ │ ├── encoding.py │ │ │ │ │ ├── entrypoints.py │ │ │ │ │ ├── filesystem.py │ │ │ │ │ ├── filetypes.py │ │ │ │ │ ├── glibc.py │ │ │ │ │ ├── hashes.py │ │ │ │ │ ├── logging.py │ │ │ │ │ ├── misc.py │ │ │ │ │ ├── models.py │ │ │ │ │ ├── packaging.py │ │ │ │ │ ├── setuptools_build.py │ │ │ │ │ ├── subprocess.py │ │ │ │ │ ├── temp_dir.py │ │ │ │ │ ├── unpacking.py │ │ │ │ │ ├── urls.py │ │ │ │ │ ├── virtualenv.py │ │ │ │ │ └── wheel.py │ │ │ │ ├── vcs │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── bazaar.py │ │ │ │ │ ├── git.py │ │ │ │ │ ├── mercurial.py │ │ │ │ │ ├── subversion.py │ │ │ │ │ └── versioncontrol.py │ │ │ │ └── wheel_builder.py │ │ │ ├── _vendor │ │ │ │ ├── __init__.py │ │ │ │ ├── cachecontrol │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _cmd.py │ │ │ │ │ ├── adapter.py │ │ │ │ │ ├── cache.py │ │ │ │ │ ├── caches │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── file_cache.py │ │ │ │ │ │ └── redis_cache.py │ │ │ │ │ ├── controller.py │ │ │ │ │ ├── filewrapper.py │ │ │ │ │ ├── heuristics.py │ │ │ │ │ ├── serialize.py │ │ │ │ │ └── wrapper.py │ │ │ │ ├── certifi │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── cacert.pem │ │ │ │ │ └── core.py │ │ │ │ ├── chardet │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── big5freq.py │ │ │ │ │ ├── big5prober.py │ │ │ │ │ ├── chardistribution.py │ │ │ │ │ ├── charsetgroupprober.py │ │ │ │ │ ├── charsetprober.py │ │ │ │ │ ├── cli │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── chardetect.py │ │ │ │ │ ├── codingstatemachine.py │ │ │ │ │ ├── codingstatemachinedict.py │ │ │ │ │ ├── cp949prober.py │ │ │ │ │ ├── enums.py │ │ │ │ │ ├── escprober.py │ │ │ │ │ ├── escsm.py │ │ │ │ │ ├── eucjpprober.py │ │ │ │ │ ├── euckrfreq.py │ │ │ │ │ ├── euckrprober.py │ │ │ │ │ ├── euctwfreq.py │ │ │ │ │ ├── euctwprober.py │ │ │ │ │ ├── gb2312freq.py │ │ │ │ │ ├── gb2312prober.py │ │ │ │ │ ├── hebrewprober.py │ │ │ │ │ ├── jisfreq.py │ │ │ │ │ ├── johabfreq.py │ │ │ │ │ ├── johabprober.py │ │ │ │ │ ├── jpcntx.py │ │ │ │ │ ├── langbulgarianmodel.py │ │ │ │ │ ├── langgreekmodel.py │ │ │ │ │ ├── langhebrewmodel.py │ │ │ │ │ ├── langhungarianmodel.py │ │ │ │ │ ├── langrussianmodel.py │ │ │ │ │ ├── langthaimodel.py │ │ │ │ │ ├── langturkishmodel.py │ │ │ │ │ ├── latin1prober.py │ │ │ │ │ ├── macromanprober.py │ │ │ │ │ ├── mbcharsetprober.py │ │ │ │ │ ├── mbcsgroupprober.py │ │ │ │ │ ├── mbcssm.py │ │ │ │ │ ├── metadata │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── languages.py │ │ │ │ │ ├── resultdict.py │ │ │ │ │ ├── sbcharsetprober.py │ │ │ │ │ ├── sbcsgroupprober.py │ │ │ │ │ ├── sjisprober.py │ │ │ │ │ ├── universaldetector.py │ │ │ │ │ ├── utf1632prober.py │ │ │ │ │ ├── utf8prober.py │ │ │ │ │ └── version.py │ │ │ │ ├── colorama │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── ansi.py │ │ │ │ │ ├── ansitowin32.py │ │ │ │ │ ├── initialise.py │ │ │ │ │ ├── tests │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── ansi_test.py │ │ │ │ │ │ ├── ansitowin32_test.py │ │ │ │ │ │ ├── initialise_test.py │ │ │ │ │ │ ├── isatty_test.py │ │ │ │ │ │ ├── utils.py │ │ │ │ │ │ └── winterm_test.py │ │ │ │ │ ├── win32.py │ │ │ │ │ └── winterm.py │ │ │ │ ├── distlib │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── compat.py │ │ │ │ │ ├── database.py │ │ │ │ │ ├── index.py │ │ │ │ │ ├── locators.py │ │ │ │ │ ├── manifest.py │ │ │ │ │ ├── markers.py │ │ │ │ │ ├── metadata.py │ │ │ │ │ ├── resources.py │ │ │ │ │ ├── scripts.py │ │ │ │ │ ├── util.py │ │ │ │ │ ├── version.py │ │ │ │ │ └── wheel.py │ │ │ │ ├── distro │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ └── distro.py │ │ │ │ ├── idna │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── codec.py │ │ │ │ │ ├── compat.py │ │ │ │ │ ├── core.py │ │ │ │ │ ├── idnadata.py │ │ │ │ │ ├── intranges.py │ │ │ │ │ ├── package_data.py │ │ │ │ │ └── uts46data.py │ │ │ │ ├── msgpack │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── exceptions.py │ │ │ │ │ ├── ext.py │ │ │ │ │ └── fallback.py │ │ │ │ ├── packaging │ │ │ │ │ ├── __about__.py │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _manylinux.py │ │ │ │ │ ├── _musllinux.py │ │ │ │ │ ├── _structures.py │ │ │ │ │ ├── markers.py │ │ │ │ │ ├── requirements.py │ │ │ │ │ ├── specifiers.py │ │ │ │ │ ├── tags.py │ │ │ │ │ ├── utils.py │ │ │ │ │ └── version.py │ │ │ │ ├── pkg_resources │ │ │ │ │ └── __init__.py │ │ │ │ ├── platformdirs │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── android.py │ │ │ │ │ ├── api.py │ │ │ │ │ ├── macos.py │ │ │ │ │ ├── unix.py │ │ │ │ │ ├── version.py │ │ │ │ │ └── windows.py │ │ │ │ ├── pygments │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── cmdline.py │ │ │ │ │ ├── console.py │ │ │ │ │ ├── filter.py │ │ │ │ │ ├── filters │ │ │ │ │ │ └── __init__.py │ │ │ │ │ ├── formatter.py │ │ │ │ │ ├── formatters │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── _mapping.py │ │ │ │ │ │ ├── bbcode.py │ │ │ │ │ │ ├── groff.py │ │ │ │ │ │ ├── html.py │ │ │ │ │ │ ├── img.py │ │ │ │ │ │ ├── irc.py │ │ │ │ │ │ ├── latex.py │ │ │ │ │ │ ├── other.py │ │ │ │ │ │ ├── pangomarkup.py │ │ │ │ │ │ ├── rtf.py │ │ │ │ │ │ ├── svg.py │ │ │ │ │ │ ├── terminal.py │ │ │ │ │ │ └── terminal256.py │ │ │ │ │ ├── lexer.py │ │ │ │ │ ├── lexers │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── _mapping.py │ │ │ │ │ │ └── python.py │ │ │ │ │ ├── modeline.py │ │ │ │ │ ├── plugin.py │ │ │ │ │ ├── regexopt.py │ │ │ │ │ ├── scanner.py │ │ │ │ │ ├── sphinxext.py │ │ │ │ │ ├── style.py │ │ │ │ │ ├── styles │ │ │ │ │ │ └── __init__.py │ │ │ │ │ ├── token.py │ │ │ │ │ ├── unistring.py │ │ │ │ │ └── util.py │ │ │ │ ├── pyparsing │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── actions.py │ │ │ │ │ ├── common.py │ │ │ │ │ ├── core.py │ │ │ │ │ ├── diagram │ │ │ │ │ │ └── __init__.py │ │ │ │ │ ├── exceptions.py │ │ │ │ │ ├── helpers.py │ │ │ │ │ ├── results.py │ │ │ │ │ ├── testing.py │ │ │ │ │ ├── unicode.py │ │ │ │ │ └── util.py │ │ │ │ ├── pyproject_hooks │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _compat.py │ │ │ │ │ ├── _impl.py │ │ │ │ │ └── _in_process │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── _in_process.py │ │ │ │ ├── requests │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __version__.py │ │ │ │ │ ├── _internal_utils.py │ │ │ │ │ ├── adapters.py │ │ │ │ │ ├── api.py │ │ │ │ │ ├── auth.py │ │ │ │ │ ├── certs.py │ │ │ │ │ ├── compat.py │ │ │ │ │ ├── cookies.py │ │ │ │ │ ├── exceptions.py │ │ │ │ │ ├── help.py │ │ │ │ │ ├── hooks.py │ │ │ │ │ ├── models.py │ │ │ │ │ ├── packages.py │ │ │ │ │ ├── sessions.py │ │ │ │ │ ├── status_codes.py │ │ │ │ │ ├── structures.py │ │ │ │ │ └── utils.py │ │ │ │ ├── resolvelib │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── compat │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── collections_abc.py │ │ │ │ │ ├── providers.py │ │ │ │ │ ├── reporters.py │ │ │ │ │ ├── resolvers.py │ │ │ │ │ └── structs.py │ │ │ │ ├── rich │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── __main__.py │ │ │ │ │ ├── _cell_widths.py │ │ │ │ │ ├── _emoji_codes.py │ │ │ │ │ ├── _emoji_replace.py │ │ │ │ │ ├── _export_format.py │ │ │ │ │ ├── _extension.py │ │ │ │ │ ├── _fileno.py │ │ │ │ │ ├── _inspect.py │ │ │ │ │ ├── _log_render.py │ │ │ │ │ ├── _loop.py │ │ │ │ │ ├── _null_file.py │ │ │ │ │ ├── _palettes.py │ │ │ │ │ ├── _pick.py │ │ │ │ │ ├── _ratio.py │ │ │ │ │ ├── _spinners.py │ │ │ │ │ ├── _stack.py │ │ │ │ │ ├── _timer.py │ │ │ │ │ ├── _win32_console.py │ │ │ │ │ ├── _windows.py │ │ │ │ │ ├── _windows_renderer.py │ │ │ │ │ ├── _wrap.py │ │ │ │ │ ├── abc.py │ │ │ │ │ ├── align.py │ │ │ │ │ ├── ansi.py │ │ │ │ │ ├── bar.py │ │ │ │ │ ├── box.py │ │ │ │ │ ├── cells.py │ │ │ │ │ ├── color.py │ │ │ │ │ ├── color_triplet.py │ │ │ │ │ ├── columns.py │ │ │ │ │ ├── console.py │ │ │ │ │ ├── constrain.py │ │ │ │ │ ├── containers.py │ │ │ │ │ ├── control.py │ │ │ │ │ ├── default_styles.py │ │ │ │ │ ├── diagnose.py │ │ │ │ │ ├── emoji.py │ │ │ │ │ ├── errors.py │ │ │ │ │ ├── file_proxy.py │ │ │ │ │ ├── filesize.py │ │ │ │ │ ├── highlighter.py │ │ │ │ │ ├── json.py │ │ │ │ │ ├── jupyter.py │ │ │ │ │ ├── layout.py │ │ │ │ │ ├── live.py │ │ │ │ │ ├── live_render.py │ │ │ │ │ ├── logging.py │ │ │ │ │ ├── markup.py │ │ │ │ │ ├── measure.py │ │ │ │ │ ├── padding.py │ │ │ │ │ ├── pager.py │ │ │ │ │ ├── palette.py │ │ │ │ │ ├── panel.py │ │ │ │ │ ├── pretty.py │ │ │ │ │ ├── progress.py │ │ │ │ │ ├── progress_bar.py │ │ │ │ │ ├── prompt.py │ │ │ │ │ ├── protocol.py │ │ │ │ │ ├── region.py │ │ │ │ │ ├── repr.py │ │ │ │ │ ├── rule.py │ │ │ │ │ ├── scope.py │ │ │ │ │ ├── screen.py │ │ │ │ │ ├── segment.py │ │ │ │ │ ├── spinner.py │ │ │ │ │ ├── status.py │ │ │ │ │ ├── style.py │ │ │ │ │ ├── styled.py │ │ │ │ │ ├── syntax.py │ │ │ │ │ ├── table.py │ │ │ │ │ ├── terminal_theme.py │ │ │ │ │ ├── text.py │ │ │ │ │ ├── theme.py │ │ │ │ │ ├── themes.py │ │ │ │ │ ├── traceback.py │ │ │ │ │ └── tree.py │ │ │ │ ├── six.py │ │ │ │ ├── tenacity │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _asyncio.py │ │ │ │ │ ├── _utils.py │ │ │ │ │ ├── after.py │ │ │ │ │ ├── before.py │ │ │ │ │ ├── before_sleep.py │ │ │ │ │ ├── nap.py │ │ │ │ │ ├── retry.py │ │ │ │ │ ├── stop.py │ │ │ │ │ ├── tornadoweb.py │ │ │ │ │ └── wait.py │ │ │ │ ├── tomli │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _parser.py │ │ │ │ │ ├── _re.py │ │ │ │ │ └── _types.py │ │ │ │ ├── truststore │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _api.py │ │ │ │ │ ├── _macos.py │ │ │ │ │ ├── _openssl.py │ │ │ │ │ ├── _ssl_constants.py │ │ │ │ │ └── _windows.py │ │ │ │ ├── typing_extensions.py │ │ │ │ ├── urllib3 │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── _collections.py │ │ │ │ │ ├── _version.py │ │ │ │ │ ├── connection.py │ │ │ │ │ ├── connectionpool.py │ │ │ │ │ ├── contrib │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── _appengine_environ.py │ │ │ │ │ │ ├── _securetransport │ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ │ ├── bindings.py │ │ │ │ │ │ │ └── low_level.py │ │ │ │ │ │ ├── appengine.py │ │ │ │ │ │ ├── ntlmpool.py │ │ │ │ │ │ ├── pyopenssl.py │ │ │ │ │ │ ├── securetransport.py │ │ │ │ │ │ └── socks.py │ │ │ │ │ ├── exceptions.py │ │ │ │ │ ├── fields.py │ │ │ │ │ ├── filepost.py │ │ │ │ │ ├── packages │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── backports │ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ │ ├── makefile.py │ │ │ │ │ │ │ └── weakref_finalize.py │ │ │ │ │ │ └── six.py │ │ │ │ │ ├── poolmanager.py │ │ │ │ │ ├── request.py │ │ │ │ │ ├── response.py │ │ │ │ │ └── util │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── connection.py │ │ │ │ │ │ ├── proxy.py │ │ │ │ │ │ ├── queue.py │ │ │ │ │ │ ├── request.py │ │ │ │ │ │ ├── response.py │ │ │ │ │ │ ├── retry.py │ │ │ │ │ │ ├── ssl_.py │ │ │ │ │ │ ├── ssl_match_hostname.py │ │ │ │ │ │ ├── ssltransport.py │ │ │ │ │ │ ├── timeout.py │ │ │ │ │ │ ├── url.py │ │ │ │ │ │ └── wait.py │ │ │ │ ├── vendor.txt │ │ │ │ └── webencodings │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── labels.py │ │ │ │ │ ├── mklabels.py │ │ │ │ │ ├── tests.py │ │ │ │ │ └── x_user_defined.py │ │ │ └── py.typed │ │ │ ├── psycopg2 │ │ │ ├── __init__.py │ │ │ ├── _ipaddress.py │ │ │ ├── _json.py │ │ │ ├── _psycopg.cpython-312-x86_64-linux-gnu.so │ │ │ ├── _range.py │ │ │ ├── errorcodes.py │ │ │ ├── errors.py │ │ │ ├── extensions.py │ │ │ ├── extras.py │ │ │ ├── pool.py │ │ │ ├── sql.py │ │ │ └── tz.py │ │ │ ├── psycopg2_binary-2.9.10.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ ├── REQUESTED │ │ │ ├── WHEEL │ │ │ └── top_level.txt │ │ │ ├── psycopg2_binary.libs │ │ │ ├── libcom_err-2abe824b.so.2.1 │ │ │ ├── libcrypto-ea28cefb.so.1.1 │ │ │ ├── libgssapi_krb5-497db0c6.so.2.2 │ │ │ ├── libk5crypto-b1f99d5c.so.3.1 │ │ │ ├── libkeyutils-dfe70bd6.so.1.5 │ │ │ ├── libkrb5-fcafa220.so.3.3 │ │ │ ├── libkrb5support-d0bcff84.so.0.1 │ │ │ ├── liblber-e0f57070.so.2.0.200 │ │ │ ├── libldap-c37ed727.so.2.0.200 │ │ │ ├── libpcre-9513aab5.so.1.2.0 │ │ │ ├── libpq-e8a033dd.so.5.16 │ │ │ ├── libsasl2-883649fd.so.3.0.0 │ │ │ ├── libselinux-0922c95c.so.1 │ │ │ └── libssl-3e69114b.so.1.1 │ │ │ ├── toml-0.10.2.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ ├── REQUESTED │ │ │ ├── WHEEL │ │ │ └── top_level.txt │ │ │ ├── toml │ │ │ ├── __init__.py │ │ │ ├── decoder.py │ │ │ ├── encoder.py │ │ │ ├── ordered.py │ │ │ └── tz.py │ │ │ ├── werkzeug-3.1.3.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE.txt │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ └── WHEEL │ │ │ └── werkzeug │ │ │ ├── __init__.py │ │ │ ├── _internal.py │ │ │ ├── _reloader.py │ │ │ ├── datastructures │ │ │ ├── __init__.py │ │ │ ├── accept.py │ │ │ ├── auth.py │ │ │ ├── cache_control.py │ │ │ ├── csp.py │ │ │ ├── etag.py │ │ │ ├── file_storage.py │ │ │ ├── headers.py │ │ │ ├── mixins.py │ │ │ ├── range.py │ │ │ └── structures.py │ │ │ ├── debug │ │ │ ├── __init__.py │ │ │ ├── console.py │ │ │ ├── repr.py │ │ │ ├── shared │ │ │ │ ├── ICON_LICENSE.md │ │ │ │ ├── console.png │ │ │ │ ├── debugger.js │ │ │ │ ├── less.png │ │ │ │ ├── more.png │ │ │ │ └── style.css │ │ │ └── tbtools.py │ │ │ ├── exceptions.py │ │ │ ├── formparser.py │ │ │ ├── http.py │ │ │ ├── local.py │ │ │ ├── middleware │ │ │ ├── __init__.py │ │ │ ├── dispatcher.py │ │ │ ├── http_proxy.py │ │ │ ├── lint.py │ │ │ ├── profiler.py │ │ │ ├── proxy_fix.py │ │ │ └── shared_data.py │ │ │ ├── py.typed │ │ │ ├── routing │ │ │ ├── __init__.py │ │ │ ├── converters.py │ │ │ ├── exceptions.py │ │ │ ├── map.py │ │ │ ├── matcher.py │ │ │ └── rules.py │ │ │ ├── sansio │ │ │ ├── __init__.py │ │ │ ├── http.py │ │ │ ├── multipart.py │ │ │ ├── request.py │ │ │ ├── response.py │ │ │ └── utils.py │ │ │ ├── security.py │ │ │ ├── serving.py │ │ │ ├── test.py │ │ │ ├── testapp.py │ │ │ ├── urls.py │ │ │ ├── user_agent.py │ │ │ ├── utils.py │ │ │ ├── wrappers │ │ │ ├── __init__.py │ │ │ ├── request.py │ │ │ └── response.py │ │ │ └── wsgi.py │ ├── lib64 │ └── pyvenv.cfg ├── README.md ├── README.pdf ├── app.log ├── database │ ├── init.sql │ └── start_db.sh ├── db │ ├── __init__.py │ ├── connection_pool.py │ ├── dao.py │ ├── models.py │ └── queries_script.py ├── logger_config.py ├── logo.png ├── mensagens.py ├── requirements.txt ├── server.py ├── services │ ├── __init__.py │ └── pessoa_service.py ├── tests │ ├── __init__.py │ ├── api_tests.sh │ ├── postman │ │ ├── dev.postman_environment.json │ │ └── testes.postman_collection.json │ ├── test_integration.py │ └── test_services.py └── web │ ├── __init__.py │ └── app.py ├── servindo_mongodb ├── README.md ├── dbstore.py └── server.py ├── tagcloud ├── README.md ├── README.pdf ├── cargos.svg ├── requirements.txt ├── tagcloud.py └── tags.txt └── virtual_environment ├── README.md ├── ds-env.yml └── im1.png /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | */venv/* 3 | */.venv/* 4 | .DS_Store -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | pythondrops.com -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-dinky -------------------------------------------------------------------------------- /audio_fft/README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/audio_fft/README.pdf -------------------------------------------------------------------------------- /audio_fft/bola.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/audio_fft/bola.wav -------------------------------------------------------------------------------- /audio_fft/carro.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/audio_fft/carro.wav -------------------------------------------------------------------------------- /audio_fft/entrada.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/audio_fft/entrada.wav -------------------------------------------------------------------------------- /audio_fft/entrada_sem_nada.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/audio_fft/entrada_sem_nada.wav -------------------------------------------------------------------------------- /audio_fft/im2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/audio_fft/im2.png -------------------------------------------------------------------------------- /audio_fft/im3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/audio_fft/im3.png -------------------------------------------------------------------------------- /audio_fft/imagem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/audio_fft/imagem.png -------------------------------------------------------------------------------- /audio_fft/praia.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/audio_fft/praia.wav -------------------------------------------------------------------------------- /audio_fft/reconhecimento_voz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/audio_fft/reconhecimento_voz.png -------------------------------------------------------------------------------- /audio_fft/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | scipy 3 | -------------------------------------------------------------------------------- /backend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/backend.png -------------------------------------------------------------------------------- /banner_livros2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/banner_livros2.png -------------------------------------------------------------------------------- /bhaskara.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | def calc_delta(a,b,c): 4 | delta = b**2 - 4 * a * c 5 | return delta 6 | 7 | a = float(input("a: ")) 8 | b = float(input("b: ")) 9 | c = float(input("c: ")) 10 | 11 | delta = calc_delta(a, b, c) 12 | 13 | if delta > 0: 14 | x1 = (-b + math.sqrt(delta)) / (2*a) 15 | x2 = (-b - math.sqrt(delta)) / (2*a) 16 | print(f"x1: {x1} e x2: {x2}") 17 | elif delta == 0: 18 | x = (-b + math.sqrt(delta)) / (2*a) 19 | print(f"x: {x}") 20 | else: 21 | print("Não possui raízes reais") 22 | -------------------------------------------------------------------------------- /bigdata/spark_avg1.py: -------------------------------------------------------------------------------- 1 | from pyspark import SparkConf, SparkContext 2 | 3 | import sys 4 | 5 | APP_NAME = " Agrega indicador de GHG " 6 | 7 | def parseLine(line): 8 | fields = line.split(',') 9 | regiao = repr(fields[3]) + repr(fields[4]) 10 | valor = float(fields[6]) 11 | return (regiao, valor) 12 | 13 | def main(sc,arquivo): 14 | lines = sc.textFile(arquivo) 15 | filterDD = lines.filter(lambda l: not l.startswith('id')) 16 | campos = filterDD.map(parseLine) 17 | medias = campos \ 18 | .mapValues(lambda valor: (valor, 1)) \ 19 | .reduceByKey(lambda x,y: (x[0]+y[0], x[1]+y[1])) \ 20 | .mapValues(lambda v: v[0]/v[1]) \ 21 | .collect() 22 | for result in medias: 23 | print(result) 24 | 25 | if __name__ == "__main__": 26 | conf = SparkConf().setAppName(APP_NAME) 27 | conf = conf.setMaster("local[*]") 28 | sc = SparkContext(conf=conf) 29 | filename = sys.argv[1] 30 | main(sc, filename) -------------------------------------------------------------------------------- /clientes_servidores/requests_flask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/clientes_servidores/requests_flask.png -------------------------------------------------------------------------------- /curso/exemplos/teaser/wtf.py: -------------------------------------------------------------------------------- 1 | achou = False 2 | def procura(t): 3 | posic = -1 4 | for i,z in enumerate(t): 5 | if z=='*': 6 | achou = True 7 | posic = i 8 | break 9 | return posic 10 | 11 | texto = input('Informe um texto: ') 12 | print('Texto digitado: ' + texto) 13 | p = procura(texto) 14 | if achou: 15 | print('Achou na posição: ',p) 16 | else: 17 | print('Não achou!') 18 | -------------------------------------------------------------------------------- /curso/licao1/curso-python-cleuton-licao1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/curso/licao1/curso-python-cleuton-licao1.pdf -------------------------------------------------------------------------------- /curso/licao2/curso-python-cleuton-licao2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/curso/licao2/curso-python-cleuton-licao2.pdf -------------------------------------------------------------------------------- /curso/licao3/correção/calc.py: -------------------------------------------------------------------------------- 1 | expressao = [-5.0,'-',2.0,'*',3.0,'+',14.0,'/',-7.0] 2 | 3 | posfixa=[] 4 | pilha=[] 5 | prioridades={'+': 1, '-': 1, '*': 2, '/': 2} 6 | 7 | # Conversão para expressão posfixa: 8 | 9 | for e in expressao: 10 | if isinstance(e,(int,float)): 11 | # Copia para a expressão 12 | posfixa.append(e) 13 | else: 14 | if not len(pilha): 15 | # Pilha vazia 16 | pilha.append(e) 17 | else: 18 | if not prioridades[pilha[-1]]>prioridades[e]: 19 | pilha.append(e) 20 | else: 21 | while len(pilha): 22 | posfixa.append(pilha.pop()) 23 | if not prioridades[posfixa[-1]]>prioridades[e]: 24 | break 25 | pilha.append(e) 26 | while len(pilha): 27 | posfixa.append(pilha.pop()) 28 | print(posfixa) 29 | 30 | # Cálculo de expressão posfixa: 31 | 32 | pilha=[] 33 | for x in posfixa: 34 | if isinstance(x,(int,float)): 35 | pilha.append(x) 36 | else: 37 | while len(pilha): 38 | op2=pilha.pop() 39 | op1=pilha.pop() 40 | pilha.append(eval(str(op1)+x+str(op2))) 41 | break 42 | print('Resultado: ',pilha.pop()) -------------------------------------------------------------------------------- /curso/licao3/curso-python-cleuton-licao3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/curso/licao3/curso-python-cleuton-licao3.pdf -------------------------------------------------------------------------------- /curso/licao4/correção/fatorar.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from util.primo import crivo 3 | 4 | def calcular(numero,sinal_ultimo): 5 | resultado=[] 6 | valor=numero 7 | lprimos=crivo(numero) 8 | i=0 9 | primo=lprimos[i] 10 | while valor > 1: 11 | resto=valor%primo 12 | if resto > 0: 13 | i=i+1 14 | primo = lprimos[i] 15 | else: 16 | valor = valor / primo 17 | if valor==1: 18 | primo = primo * sinal_ultimo 19 | resultado.append(primo) 20 | return resultado 21 | 22 | if __name__=='__main__': 23 | numero=int(sys.argv[1]) 24 | resultado = None 25 | if numero==0: 26 | resultado=[0] 27 | else: 28 | if numero > 0 and numero < 3: 29 | resultado = [numero] 30 | else: 31 | valor = numero 32 | sinal=1 33 | if numero < 0: 34 | sinal=-1 35 | valor=numero * (-1) 36 | resultado = calcular(valor,sinal) 37 | print(resultado) 38 | -------------------------------------------------------------------------------- /curso/licao4/correção/util/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/curso/licao4/correção/util/__init__.py -------------------------------------------------------------------------------- /curso/licao4/correção/util/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/curso/licao4/correção/util/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /curso/licao4/correção/util/__pycache__/primo.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/curso/licao4/correção/util/__pycache__/primo.cpython-37.pyc -------------------------------------------------------------------------------- /curso/licao4/correção/util/primo.py: -------------------------------------------------------------------------------- 1 | def crivo(n): 2 | lprimos=[] 3 | for x in range(2,(n+1)): 4 | lprimos.append(x) 5 | p = 2; 6 | while p**2<=n: 7 | m = 2; 8 | while (m*p <= n): 9 | for i in range(len(lprimos)): 10 | valor = lprimos[i]; 11 | if valor==(m*p): 12 | lprimos.remove(valor) 13 | break 14 | m=m+1 15 | i=lprimos.index(p) 16 | if i+1<(n+1): 17 | p=lprimos[i+1] 18 | return lprimos 19 | -------------------------------------------------------------------------------- /curso/licao4/curso-python-cleuton-licao4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/curso/licao4/curso-python-cleuton-licao4.pdf -------------------------------------------------------------------------------- /curso/licao4/escopo.py: -------------------------------------------------------------------------------- 1 | glob='Variável global' 2 | 3 | def funcao(): 4 | local='Variável local' 5 | while True: 6 | var_bloco='Var bloco' 7 | break 8 | print(glob,local,var_bloco) 9 | 10 | funcao() 11 | -------------------------------------------------------------------------------- /curso/licao4/jogo.py: -------------------------------------------------------------------------------- 1 | import geom 2 | # 3 | # Game loop 4 | # 5 | # Criar objeto: 6 | player=geom.GABARITO_OBJETO.copy() 7 | 8 | # Mover objeto: 9 | retorno = geom.mover(player,'cima') 10 | if not retorno: 11 | print('erro') -------------------------------------------------------------------------------- /curso/licao4/jogo_novo.py: -------------------------------------------------------------------------------- 1 | import geom_lib as geom 2 | # 3 | # Game loop 4 | # 5 | # Criar objeto: 6 | player=geom.GABARITO_OBJETO.copy() 7 | 8 | # Mover objeto: 9 | retorno = geom.mover(player,'cima') 10 | if not retorno: 11 | print('erro') -------------------------------------------------------------------------------- /curso/licao4/jogo_pasta.py: -------------------------------------------------------------------------------- 1 | import utils.geom_lib as geom 2 | # 3 | # Game loop 4 | # 5 | # Criar objeto: 6 | player=geom.GABARITO_OBJETO.copy() 7 | 8 | # Mover objeto: 9 | retorno = geom.mover(player,'cima') 10 | if not retorno: 11 | print('erro') -------------------------------------------------------------------------------- /curso/licao4/utils/__init__.py: -------------------------------------------------------------------------------- 1 | print('Rodou init') 2 | __all__=['mover','colisao'] -------------------------------------------------------------------------------- /curso/licao4/utils/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/curso/licao4/utils/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /curso/licao4/utils/__pycache__/geom_lib.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/curso/licao4/utils/__pycache__/geom_lib.cpython-37.pyc -------------------------------------------------------------------------------- /curso/licao4/vglobal.py: -------------------------------------------------------------------------------- 1 | achou=False 2 | def procurar(texto): 3 | global achou 4 | for c in texto: 5 | if c=='*' or c=='&': 6 | achou=True 7 | 8 | procurar('Este * um t&xto legal') 9 | print(achou) -------------------------------------------------------------------------------- /curso/licao5/arqexception.py: -------------------------------------------------------------------------------- 1 | import sys 2 | try: 3 | a=open('arquivo.txt') 4 | print(a.read()) 5 | except FileNotFoundError: 6 | print('Arquivo inexistente') 7 | except: 8 | print('Erro inesperado: {}'.format(sys.exc_info()[0])) 9 | raise 10 | else: 11 | print('não deu erro') 12 | finally: 13 | print('com erro ou sem erro, eu sempre executarei!') -------------------------------------------------------------------------------- /curso/licao5/cria.py: -------------------------------------------------------------------------------- 1 | arq=open('novo.txt','w') 2 | arq.write('Minha terra tem palmeiras') 3 | arq.write('Onde canta o sabiá') 4 | arq.write('As aves que aqui gorjeiam') 5 | arq.write('Não gorjeiam como lá') 6 | arq.close() 7 | -------------------------------------------------------------------------------- /curso/licao5/cria2.py: -------------------------------------------------------------------------------- 1 | try: 2 | arq=open('novo2.txt','x') 3 | try: 4 | arq.write('Minha terra tem palmeiras\n') 5 | arq.write('Onde canta o sabiá\n') 6 | arq.write('As aves que aqui gorjeiam\n') 7 | print('Não gorjeiam como lá',file=arq) 8 | arq.close() 9 | finally: 10 | arq.close() 11 | except FileExistsError: 12 | print('O arquivo "novo2.txt" já existe!') 13 | -------------------------------------------------------------------------------- /curso/licao5/cria3.py: -------------------------------------------------------------------------------- 1 | try: 2 | with open('novo3.txt','x') as arq: 3 | arq.write('Minha terra tem palmeiras\n') 4 | arq.write('Onde canta o sabiá\n') 5 | arq.write('As aves que aqui gorjeiam\n') 6 | print('Não gorjeiam como lá',file=arq) 7 | except FileExistsError: 8 | print('O arquivo já existe!') -------------------------------------------------------------------------------- /curso/licao5/curso-python-cleuton-licao5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/curso/licao5/curso-python-cleuton-licao5.pdf -------------------------------------------------------------------------------- /curso/licao5/except.py: -------------------------------------------------------------------------------- 1 | import sys 2 | def fn1(): 3 | raise ValueError('Ferrou') 4 | 5 | def fn2(): 6 | try: 7 | print('comando1') 8 | fn1() 9 | print('outro comando') 10 | except OSError as oserro: 11 | print("Erro do Sistema Operacional: {0}".format(oserro)) 12 | 13 | try: 14 | fn2() 15 | except ValueError as erro: 16 | print('Value Error: {}'.format(erro)) 17 | except: 18 | print('ERRO:', sys.exc_info()[0]) 19 | raise -------------------------------------------------------------------------------- /curso/licao5/jsongrava.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | from datetime import timedelta 3 | import json 4 | movimento=[] 5 | agora=datetime.now() 6 | depois=timedelta(minutes=10) 7 | nova=agora+depois 8 | formato="%d/%m/%Y %H:%M:%S" 9 | movimento.append({"cliente":1, 10 | "mercadoria":10, 11 | "quantidade":5.5, 12 | "data":agora.strftime(formato)}) 13 | movimento.append({"cliente":2, 14 | "mercadoria":15, 15 | "quantidade":23.2, 16 | "data":nova.strftime(formato)}) 17 | with open('saida.json', 'w') as saida: 18 | json.dump(movimento,saida) -------------------------------------------------------------------------------- /curso/licao5/jsonler.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | import json 3 | from json.decoder import JSONDecodeError 4 | import locale 5 | locale.setlocale(locale.LC_ALL, 'pt_BR.UTF-8') 6 | lista=[] 7 | produtos={10:"Leite",15:"Iogurte",20:"Manteiga"} 8 | formato="%d/%m/%Y %H:%M:%S" 9 | try: 10 | with open('saida.json','r') as arq: 11 | lista=json.load(arq) 12 | for venda in lista: 13 | nome_produto=produtos[venda['mercadoria']] 14 | data=datetime.strptime(venda['data'],formato) 15 | sdata=data.strftime(locale.nl_langinfo(locale.D_T_FMT)) 16 | quantidade=locale.format_string('%.2f',venda['quantidade']) 17 | print('Cliente: {}, Produto: {}, Data: {}, Quantidade: {}'.format( 18 | venda['cliente'],nome_produto,sdata,quantidade 19 | ) 20 | ) 21 | except JSONDecodeError: 22 | print('O arquivo de movimento está inválido!') -------------------------------------------------------------------------------- /curso/licao5/le.py: -------------------------------------------------------------------------------- 1 | a=open('novo.txt') 2 | print(a.read()) -------------------------------------------------------------------------------- /curso/licao5/ler3.py: -------------------------------------------------------------------------------- 1 | try: 2 | with open('novo3.txt') as texto: 3 | for linha in texto: 4 | print(linha.strip()) 5 | except FileNotFoundError: 6 | print('O arquivo não existe!') -------------------------------------------------------------------------------- /curso/licao5/ler4.py: -------------------------------------------------------------------------------- 1 | try: 2 | with open('novo3.txt') as texto: 3 | linha = texto.readline() 4 | i = 0 5 | while linha: 6 | i+=1 7 | print('Linha: {}: {}'.format(i,linha.strip())) 8 | linha = texto.readline() 9 | print('Eu li {} linhas'.format(i)) 10 | except FileNotFoundError: 11 | print('O arquivo não existe!') -------------------------------------------------------------------------------- /curso/licao5/saida.json: -------------------------------------------------------------------------------- 1 | [{"cliente": 1, "mercadoria": 10, "quantidade": 5.5, "data": "10/06/2021 16:55:32"}, {"cliente": 2, "mercadoria": 15, "quantidade": 23.2, "data": "10/06/2021 17:05:32"}] -------------------------------------------------------------------------------- /curso/licao5/semexcept.1.py: -------------------------------------------------------------------------------- 1 | try: 2 | a=open('arquivo.txt') 3 | print(a.read()) 4 | except: 5 | print('Arquivo inexistente') -------------------------------------------------------------------------------- /curso/licao5/semexcept.py: -------------------------------------------------------------------------------- 1 | a=open('arquivo.txt') 2 | print(a.read()) -------------------------------------------------------------------------------- /curso/licao5/sql1.py: -------------------------------------------------------------------------------- 1 | import psycopg2 2 | import urllib.parse as up 3 | 4 | # A url abaixo está propositadamente ofuscada: 5 | url = up.urlparse("postgres://@@@@@@:*****@elmer.db.elephantsql.com:5432/##") 6 | db = psycopg2.connect(database=url.path[1:], 7 | user=url.username, 8 | password=url.password, 9 | host=url.hostname, 10 | port=url.port 11 | ) 12 | cursor = db.cursor() 13 | cursor.execute('select * from account') 14 | registros = cursor.fetchall() 15 | for registro in registros: 16 | print (registro) 17 | db.close() 18 | -------------------------------------------------------------------------------- /curso/licao5/sql2.py: -------------------------------------------------------------------------------- 1 | import psycopg2 2 | import urllib.parse as up 3 | 4 | # A url abaixo está propositadamente ofuscada: 5 | url = up.urlparse("postgres://@@@@@@:*****@elmer.db.elephantsql.com:5432/##") 6 | db = psycopg2.connect(database=url.path[1:], 7 | user=url.username, 8 | password=url.password, 9 | host=url.hostname, 10 | port=url.port 11 | ) 12 | cursor = db.cursor() 13 | cursor.execute('select * from account') 14 | registros = cursor.fetchall() 15 | for registro in registros: 16 | print('Usuário: {} email: {} data criação: {}'.format(registro[0],registro[3],registro[4])) 17 | db.close() 18 | -------------------------------------------------------------------------------- /curso/licao5/sql3.py: -------------------------------------------------------------------------------- 1 | import psycopg2 2 | import urllib.parse as up 3 | import datetime 4 | data = datetime.datetime.now() 5 | 6 | # A url abaixo está propositadamente ofuscada: 7 | url = up.urlparse("postgres://@@@@@@:*****@elmer.db.elephantsql.com:5432/##") 8 | db = psycopg2.connect(database=url.path[1:], 9 | user=url.username, 10 | password=url.password, 11 | host=url.hostname, 12 | port=url.port 13 | ) 14 | cursor = db.cursor() 15 | cursor.execute("INSERT INTO account (user_id,username,password,email,created_on,last_login) VALUES (%s, %s, %s, %s, %s, %s)", 16 | (3, 'Beltrano', 'bbb', 'beltrano@test', data.strftime('%Y-%m-%d %H:%M:%S'), None)) 17 | db.commit() 18 | db.close() 19 | -------------------------------------------------------------------------------- /curso/licao6/carro.py: -------------------------------------------------------------------------------- 1 | class Carro: 2 | eixos = 2 3 | def __init__(self,marca=None): 4 | self.marca = marca 5 | def metodo(): 6 | print('Chamou') -------------------------------------------------------------------------------- /curso/licao6/carro_1.py: -------------------------------------------------------------------------------- 1 | class Carro: 2 | eixos = 2 3 | def __init__(self,marca=None): 4 | self.marca = marca 5 | def dict(self): 6 | return {'marca':self.marca} 7 | -------------------------------------------------------------------------------- /curso/licao6/carro_2.py: -------------------------------------------------------------------------------- 1 | class Carro: 2 | eixos = 2 3 | def __init__(self,marca=None): 4 | self.marca = marca 5 | @staticmethod 6 | def comentario(): 7 | return "Esta é a classe carro." 8 | @classmethod 9 | def tipoVeiculo(cls): 10 | return "Este veículo tem {} eixos".format(cls.eixos) 11 | -------------------------------------------------------------------------------- /curso/licao6/carro_3.py: -------------------------------------------------------------------------------- 1 | class Carro: 2 | eixos = 2 3 | def __init__(self,marca=None, chassi=None): 4 | self._chassi = chassi 5 | self.marca = marca 6 | def _mostrar(self): 7 | return self._chassi 8 | 9 | -------------------------------------------------------------------------------- /curso/licao6/carro_4.py: -------------------------------------------------------------------------------- 1 | class Carro: 2 | eixos = 2 3 | __quantidade = 0 4 | def __init__(self,marca=None): 5 | Carro._Carro__quantidade+=1 6 | self.marca = marca 7 | @classmethod 8 | def contagem(cls): 9 | return "existem {} veiculos".format(cls._Carro__quantidade) 10 | 11 | 12 | -------------------------------------------------------------------------------- /curso/licao6/curso-python-cleuton-licao6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/curso/licao6/curso-python-cleuton-licao6.pdf -------------------------------------------------------------------------------- /curso/licao6/dunders.py: -------------------------------------------------------------------------------- 1 | class Carro: 2 | def __init__(self,marca=None,comprimento=0.0): 3 | self.marca = marca 4 | self.comprimento = comprimento 5 | def __eq__(self,other): 6 | return self.marca==other.marca 7 | def __lt__(self,other): 8 | return self.comprimento1 else 10 9 | colunas = int(sys.argv[2]) if len(sys.argv)>2 else 10 10 | 11 | labirinto = Labirinto(linhas,colunas) 12 | print(labirinto) 13 | 14 | solver = Solver() 15 | solver.solve(labirinto) 16 | print(labirinto) -------------------------------------------------------------------------------- /maze/model/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/maze/model/__init__.py -------------------------------------------------------------------------------- /maze/model/celula.py: -------------------------------------------------------------------------------- 1 | class Celula(): 2 | def __init__(self): 3 | self.paredes = [True, True, True, True]; 4 | self.visitada = False; 5 | self.inicio = False; 6 | self.fim = False; 7 | self.x = 0; 8 | self.y = 0; 9 | self.ocupada = False; 10 | self.objeto = 0; -------------------------------------------------------------------------------- /maze/model/constantes.py: -------------------------------------------------------------------------------- 1 | NORTE = 0; 2 | SUL = 1; 3 | LESTE = 2; 4 | OESTE = 3; -------------------------------------------------------------------------------- /maze/model/stack.py: -------------------------------------------------------------------------------- 1 | from collections import namedtuple 2 | 3 | class _Entry(namedtuple('_Entry', 'value next')): 4 | def _repr_assist(self, postfix): 5 | r = repr(self.value) + postfix 6 | if self.next is not None: 7 | return self.next._repr_assist(', ' + r) 8 | return r 9 | 10 | class Stack(object): 11 | def __init__(self): 12 | self.top = None 13 | def push(self, value): 14 | self.top = _Entry(value, self.top) 15 | def pop(self): 16 | if self.top is None: 17 | raise ValueError("Can't pop from an empty stack") 18 | res, self.top = self.top.value, self.top.next 19 | return res 20 | def __repr__(self): 21 | if self.top is None: return '[]' 22 | return '[' + self.top._repr_assist(']') -------------------------------------------------------------------------------- /maze/requirements.txt: -------------------------------------------------------------------------------- 1 | colorama 2 | -------------------------------------------------------------------------------- /maze/robo-sensores-IMU.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/maze/robo-sensores-IMU.jpg -------------------------------------------------------------------------------- /modulos_imports/__pycache__/puro.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/modulos_imports/__pycache__/puro.cpython-36.pyc -------------------------------------------------------------------------------- /modulos_imports/bhaskara.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/modulos_imports/bhaskara.png -------------------------------------------------------------------------------- /modulos_imports/calculador.py: -------------------------------------------------------------------------------- 1 | import coeficientes 2 | import raizes 3 | if __name__ == '__main__': 4 | a,b,c = coeficientes.obterCoeficientes() 5 | raizes.calcRaizes(a,b,c) -------------------------------------------------------------------------------- /modulos_imports/cdelta.py: -------------------------------------------------------------------------------- 1 | def calcDelta(a,b,c): 2 | delta = b**2 - 4*a*c 3 | if delta < 0: 4 | return float('nan') 5 | else: 6 | return delta -------------------------------------------------------------------------------- /modulos_imports/coeficientes.py: -------------------------------------------------------------------------------- 1 | def obterCoeficientes(): 2 | return 1,-5,6 -------------------------------------------------------------------------------- /modulos_imports/importado.py: -------------------------------------------------------------------------------- 1 | import puro -------------------------------------------------------------------------------- /modulos_imports/puro.py: -------------------------------------------------------------------------------- 1 | print("__name__ = ",__name__) 2 | if __name__ == "__main__": 3 | print("Rodou direto") 4 | else: 5 | print("Rodou através de import") -------------------------------------------------------------------------------- /modulos_imports/raizes.py: -------------------------------------------------------------------------------- 1 | import cdelta 2 | import math 3 | def calcRaizes(a,b,c): 4 | delta = cdelta.calcDelta(a,b,c) 5 | if math.isnan(delta): 6 | print('Não possui raízes reais') 7 | elif delta == 0: 8 | raiz = -b / 2*a 9 | print('Possui apenas uma raiz: ',raiz) 10 | else: 11 | x1 = (-b + math.sqrt(delta)) / 2*a 12 | x2 = (-b - math.sqrt(delta)) / 2*a 13 | print('X1: ',x1,', X2: ',x2) -------------------------------------------------------------------------------- /new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/new.png -------------------------------------------------------------------------------- /packages/__pycache__/a.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/packages/__pycache__/a.cpython-36.pyc -------------------------------------------------------------------------------- /packages/__pycache__/coeficientes.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/packages/__pycache__/coeficientes.cpython-36.pyc -------------------------------------------------------------------------------- /packages/__pycache__/procura.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/packages/__pycache__/procura.cpython-36.pyc -------------------------------------------------------------------------------- /packages/a.py: -------------------------------------------------------------------------------- 1 | from bdir import b 2 | def calcular(): 3 | return b.xpto(4) 4 | -------------------------------------------------------------------------------- /packages/bdir/__pycache__/b.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/packages/bdir/__pycache__/b.cpython-36.pyc -------------------------------------------------------------------------------- /packages/bdir/b.py: -------------------------------------------------------------------------------- 1 | def xpto(n): 2 | return(n**2) -------------------------------------------------------------------------------- /packages/bhaskara/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/packages/bhaskara/__init__.py -------------------------------------------------------------------------------- /packages/bhaskara/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/packages/bhaskara/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /packages/bhaskara/__pycache__/cdelta.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/packages/bhaskara/__pycache__/cdelta.cpython-36.pyc -------------------------------------------------------------------------------- /packages/bhaskara/__pycache__/raizes.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/packages/bhaskara/__pycache__/raizes.cpython-36.pyc -------------------------------------------------------------------------------- /packages/bhaskara/cdelta.py: -------------------------------------------------------------------------------- 1 | def calcDelta(a,b,c): 2 | delta = b**2 - 4*a*c 3 | if delta < 0: 4 | return float('nan') 5 | else: 6 | return delta -------------------------------------------------------------------------------- /packages/bhaskara/raizes.py: -------------------------------------------------------------------------------- 1 | from . import cdelta 2 | import math 3 | def calcRaizes(a,b,c): 4 | delta = cdelta.calcDelta(a,b,c) 5 | if math.isnan(delta): 6 | print('Não possui raízes reais') 7 | elif delta == 0: 8 | raiz = -b / 2*a 9 | print('Possui apenas uma raiz: ',raiz) 10 | else: 11 | x1 = (-b + math.sqrt(delta)) / 2*a 12 | x2 = (-b - math.sqrt(delta)) / 2*a 13 | print('X1: ',x1,', X2: ',x2) -------------------------------------------------------------------------------- /packages/calculador.py: -------------------------------------------------------------------------------- 1 | import coeficientes 2 | from bhaskara import raizes 3 | if __name__ == '__main__': 4 | a,b,c = coeficientes.obterCoeficientes() 5 | raizes.calcRaizes(a,b,c) -------------------------------------------------------------------------------- /packages/coeficientes.py: -------------------------------------------------------------------------------- 1 | def obterCoeficientes(): 2 | return 1,-5,6 -------------------------------------------------------------------------------- /packages/procura.py: -------------------------------------------------------------------------------- 1 | import a 2 | print(a.calcular()) -------------------------------------------------------------------------------- /python-drops.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/python-drops.png -------------------------------------------------------------------------------- /python_gil/README.md: -------------------------------------------------------------------------------- 1 | ![](../python-drops.png) 2 | # pythondrops 3 | ## Python drops & technology 4 | 5 | (c) 2018 [**Cleuton Sampaio**](https://github.com/cleuton). 6 | 7 | [![](../banner_livros2.png)](https://www.lcm.com.br/site/#livros/busca?term=cleuton) 8 | 9 | # PythonDrops 7: Python, GIL e paralelismo 10 | 11 | Bom, neste artigo vou mostrar a você um pouco das idiossincrasias do Python e seus efeitos no seu projeto de software. Veremos uma característica curiosa, o **GIL - Global Interpreter Lock**, e como podemos contorná-lo. 12 | 13 | O fonte do texto está no [**Bom Programador**](http://www.obomprogramador.com/2019/03/python-paralelismo-e-gil-nem-tudo.html) 14 | -------------------------------------------------------------------------------- /python_gil/java/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | com.obomprogramador 6 | multi 7 | 0.0.1-SNAPSHOT 8 | jar 9 | 10 | multi 11 | http://maven.apache.org 12 | 13 | 14 | UTF-8 15 | 16 | 17 | 18 | 19 | org.apache.commons 20 | commons-lang3 21 | 3.7 22 | 23 | 24 | junit 25 | junit 26 | 3.8.1 27 | test 28 | 29 | 30 | 31 | 32 | 33 | org.apache.maven.plugins 34 | maven-compiler-plugin 35 | 3.8.0 36 | 37 | 11 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /python_gil/java/target/classes/com/obomprogramador/multi/CallableFibo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/python_gil/java/target/classes/com/obomprogramador/multi/CallableFibo.class -------------------------------------------------------------------------------- /python_gil/java/target/classes/com/obomprogramador/multi/FibCalc.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/python_gil/java/target/classes/com/obomprogramador/multi/FibCalc.class -------------------------------------------------------------------------------- /python_gil/java/target/classes/com/obomprogramador/multi/Fibo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/python_gil/java/target/classes/com/obomprogramador/multi/Fibo.class -------------------------------------------------------------------------------- /python_gil/java/target/classes/com/obomprogramador/multi/Resultado.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/python_gil/java/target/classes/com/obomprogramador/multi/Resultado.class -------------------------------------------------------------------------------- /python_gil/python/thread_fibo.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from utils.timer import Timer 3 | from multiprocessing.pool import ThreadPool 4 | 5 | def fibo(n): 6 | if n==0: 7 | return 0 8 | # Second Fibonacci number is 1 9 | elif n==1: 10 | return 1 11 | else: 12 | return fibo(n-1)+fibo(n-2) 13 | 14 | def testThread(x): 15 | timer1 = Timer() 16 | timer1.tic() 17 | valor = fibo(34) 18 | timer1.toc() 19 | return (valor,timer1.total_time) 20 | 21 | if __name__ == "__main__": 22 | if len(sys.argv)>1: 23 | num_threads = int(sys.argv[1]) 24 | pool = ThreadPool(num_threads) 25 | lista = pool.map(testThread,range(num_threads)) 26 | print(lista) 27 | else: 28 | timer1 = Timer() 29 | timer1.tic() 30 | valor = fibo(34) 31 | timer1.toc() 32 | print('Resultado: ' + str(valor) + ' segundos: ' + str(timer1.total_time)) 33 | 34 | 35 | -------------------------------------------------------------------------------- /python_gil/python/utils/__pycache__/timer.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/python_gil/python/utils/__pycache__/timer.cpython-37.pyc -------------------------------------------------------------------------------- /python_gil/python/utils/timer.py: -------------------------------------------------------------------------------- 1 | # -------------------------------------------------------- 2 | # Fast R-CNN 3 | # Copyright (c) 2015 Microsoft 4 | # Licensed under The MIT License [see LICENSE for details] 5 | # Written by Ross Girshick 6 | # -------------------------------------------------------- 7 | 8 | import time 9 | 10 | class Timer(object): 11 | """A simple timer.""" 12 | def __init__(self): 13 | self.total_time = 0. 14 | self.calls = 0 15 | self.start_time = 0. 16 | self.diff = 0. 17 | self.average_time = 0. 18 | self.start_date = time.strftime("%Y-%m-%d %H:%M:%S") 19 | 20 | def tic(self): 21 | # using time.time instead of time.clock because time time.clock 22 | # does not normalize for multithreading 23 | self.start_time = time.time() 24 | 25 | def toc(self, average=True): 26 | self.diff = time.time() - self.start_time 27 | self.total_time += self.diff 28 | self.calls += 1 29 | self.average_time = self.total_time / self.calls 30 | if average: 31 | return self.average_time 32 | else: 33 | return self.diff 34 | 35 | def set_start_date(self): 36 | self.start_date = time.strftime("%Y-%m-%d %H:%M:%S") 37 | 38 | def get_start_date(self): 39 | return self.start_date -------------------------------------------------------------------------------- /python_gil/python/worker_fibo.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from utils.timer import Timer 3 | from multiprocessing import Pool 4 | 5 | def fibo(n): 6 | if n==0: 7 | return 0 8 | # Second Fibonacci number is 1 9 | elif n==1: 10 | return 1 11 | else: 12 | return fibo(n-1)+fibo(n-2) 13 | 14 | def testThread(x): 15 | timer1 = Timer() 16 | timer1.tic() 17 | valor = fibo(34) 18 | timer1.toc() 19 | return (valor,timer1.total_time) 20 | 21 | if __name__ == "__main__": 22 | if len(sys.argv)>1: 23 | num_proc = int(sys.argv[1]) 24 | pool = Pool(processes=num_proc) 25 | lista = pool.map(testThread,range(num_proc)) 26 | print(lista) 27 | else: 28 | timer1 = Timer() 29 | timer1.tic() 30 | valor = fibo(34) 31 | timer1.toc() 32 | print('Resultado: ' + str(valor) + ' segundos: ' + str(timer1.total_time)) 33 | 34 | 35 | -------------------------------------------------------------------------------- /restful_python/.venv/bin/activate.csh: -------------------------------------------------------------------------------- 1 | # This file must be used with "source bin/activate.csh" *from csh*. 2 | # You cannot run it directly. 3 | 4 | # Created by Davide Di Blasi . 5 | # Ported to Python 3.3 venv by Andrew Svetlov 6 | 7 | alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' 8 | 9 | # Unset irrelevant variables. 10 | deactivate nondestructive 11 | 12 | setenv VIRTUAL_ENV /home/cleuton/Documents/projetos/restful_python/.venv 13 | 14 | set _OLD_VIRTUAL_PATH="$PATH" 15 | setenv PATH "$VIRTUAL_ENV/"bin":$PATH" 16 | 17 | 18 | set _OLD_VIRTUAL_PROMPT="$prompt" 19 | 20 | if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then 21 | set prompt = '(.venv) '"$prompt" 22 | setenv VIRTUAL_ENV_PROMPT '(.venv) ' 23 | endif 24 | 25 | alias pydoc python -m pydoc 26 | 27 | rehash 28 | -------------------------------------------------------------------------------- /restful_python/.venv/bin/flask: -------------------------------------------------------------------------------- 1 | #!/home/cleuton/Documents/projetos/restful_python/.venv/bin/python3 2 | # -*- coding: utf-8 -*- 3 | import re 4 | import sys 5 | from flask.cli import main 6 | if __name__ == '__main__': 7 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 8 | sys.exit(main()) 9 | -------------------------------------------------------------------------------- /restful_python/.venv/bin/gunicorn: -------------------------------------------------------------------------------- 1 | #!/home/cleuton/Documents/projetos/restful_python/.venv/bin/python3 2 | # -*- coding: utf-8 -*- 3 | import re 4 | import sys 5 | from gunicorn.app.wsgiapp import run 6 | if __name__ == '__main__': 7 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 8 | sys.exit(run()) 9 | -------------------------------------------------------------------------------- /restful_python/.venv/bin/pip: -------------------------------------------------------------------------------- 1 | #!/home/cleuton/Documents/projetos/restful_python/.venv/bin/python3 2 | # -*- coding: utf-8 -*- 3 | import re 4 | import sys 5 | from pip._internal.cli.main import main 6 | if __name__ == '__main__': 7 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 8 | sys.exit(main()) 9 | -------------------------------------------------------------------------------- /restful_python/.venv/bin/pip3: -------------------------------------------------------------------------------- 1 | #!/home/cleuton/Documents/projetos/restful_python/.venv/bin/python3 2 | # -*- coding: utf-8 -*- 3 | import re 4 | import sys 5 | from pip._internal.cli.main import main 6 | if __name__ == '__main__': 7 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 8 | sys.exit(main()) 9 | -------------------------------------------------------------------------------- /restful_python/.venv/bin/pip3.12: -------------------------------------------------------------------------------- 1 | #!/home/cleuton/Documents/projetos/restful_python/.venv/bin/python3 2 | # -*- coding: utf-8 -*- 3 | import re 4 | import sys 5 | from pip._internal.cli.main import main 6 | if __name__ == '__main__': 7 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 8 | sys.exit(main()) 9 | -------------------------------------------------------------------------------- /restful_python/.venv/bin/python: -------------------------------------------------------------------------------- 1 | python3 -------------------------------------------------------------------------------- /restful_python/.venv/bin/python3: -------------------------------------------------------------------------------- 1 | /usr/bin/python3 -------------------------------------------------------------------------------- /restful_python/.venv/bin/python3.12: -------------------------------------------------------------------------------- 1 | python3 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/MarkupSafe-3.0.2.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/MarkupSafe-3.0.2.dist-info/RECORD: -------------------------------------------------------------------------------- 1 | MarkupSafe-3.0.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 2 | MarkupSafe-3.0.2.dist-info/LICENSE.txt,sha256=SJqOEQhQntmKN7uYPhHg9-HTHwvY-Zp5yESOf_N9B-o,1475 3 | MarkupSafe-3.0.2.dist-info/METADATA,sha256=aAwbZhSmXdfFuMM-rEHpeiHRkBOGESyVLJIuwzHP-nw,3975 4 | MarkupSafe-3.0.2.dist-info/RECORD,, 5 | MarkupSafe-3.0.2.dist-info/WHEEL,sha256=OVgtqZzfzIXXtylXP90gxCZ6CKBCwKYyHM8PpMEjN1M,151 6 | MarkupSafe-3.0.2.dist-info/top_level.txt,sha256=qy0Plje5IJuvsCBjejJyhDCjEAdcDLK_2agVcex8Z6U,11 7 | markupsafe/__init__.py,sha256=sr-U6_27DfaSrj5jnHYxWN-pvhM27sjlDplMDPZKm7k,13214 8 | markupsafe/__pycache__/__init__.cpython-312.pyc,, 9 | markupsafe/__pycache__/_native.cpython-312.pyc,, 10 | markupsafe/_native.py,sha256=hSLs8Jmz5aqayuengJJ3kdT5PwNpBWpKrmQSdipndC8,210 11 | markupsafe/_speedups.c,sha256=O7XulmTo-epI6n2FtMVOrJXl8EAaIwD2iNYmBI5SEoQ,4149 12 | markupsafe/_speedups.cpython-312-x86_64-linux-gnu.so,sha256=t1DBZlpsjFA30BOOvXfXfT1wvO_4cS16VbHz1-49q5U,43432 13 | markupsafe/_speedups.pyi,sha256=ENd1bYe7gbBUf2ywyYWOGUpnXOHNJ-cgTNqetlW8h5k,41 14 | markupsafe/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 15 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/MarkupSafe-3.0.2.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: setuptools (75.2.0) 3 | Root-Is-Purelib: false 4 | Tag: cp312-cp312-manylinux_2_17_x86_64 5 | Tag: cp312-cp312-manylinux2014_x86_64 6 | 7 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/MarkupSafe-3.0.2.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | markupsafe 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2010 Jason Kirtland 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/RECORD: -------------------------------------------------------------------------------- 1 | blinker-1.9.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 2 | blinker-1.9.0.dist-info/LICENSE.txt,sha256=nrc6HzhZekqhcCXSrhvjg5Ykx5XphdTw6Xac4p-spGc,1054 3 | blinker-1.9.0.dist-info/METADATA,sha256=uIRiM8wjjbHkCtbCyTvctU37IAZk0kEe5kxAld1dvzA,1633 4 | blinker-1.9.0.dist-info/RECORD,, 5 | blinker-1.9.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82 6 | blinker/__init__.py,sha256=I2EdZqpy4LyjX17Hn1yzJGWCjeLaVaPzsMgHkLfj_cQ,317 7 | blinker/__pycache__/__init__.cpython-312.pyc,, 8 | blinker/__pycache__/_utilities.cpython-312.pyc,, 9 | blinker/__pycache__/base.cpython-312.pyc,, 10 | blinker/_utilities.py,sha256=0J7eeXXTUx0Ivf8asfpx0ycVkp0Eqfqnj117x2mYX9E,1675 11 | blinker/base.py,sha256=QpDuvXXcwJF49lUBcH5BiST46Rz9wSG7VW_p7N_027M,19132 12 | blinker/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 13 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/blinker-1.9.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: flit 3.10.1 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/blinker/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from .base import ANY 4 | from .base import default_namespace 5 | from .base import NamedSignal 6 | from .base import Namespace 7 | from .base import Signal 8 | from .base import signal 9 | 10 | __all__ = [ 11 | "ANY", 12 | "default_namespace", 13 | "NamedSignal", 14 | "Namespace", 15 | "Signal", 16 | "signal", 17 | ] 18 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/blinker/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/blinker/py.typed -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/click-8.1.8.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/click-8.1.8.dist-info/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 Pallets 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 21 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 24 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/click-8.1.8.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: flit 3.10.1 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/click/_textwrap.py: -------------------------------------------------------------------------------- 1 | import textwrap 2 | import typing as t 3 | from contextlib import contextmanager 4 | 5 | 6 | class TextWrapper(textwrap.TextWrapper): 7 | def _handle_long_word( 8 | self, 9 | reversed_chunks: t.List[str], 10 | cur_line: t.List[str], 11 | cur_len: int, 12 | width: int, 13 | ) -> None: 14 | space_left = max(width - cur_len, 1) 15 | 16 | if self.break_long_words: 17 | last = reversed_chunks[-1] 18 | cut = last[:space_left] 19 | res = last[space_left:] 20 | cur_line.append(cut) 21 | reversed_chunks[-1] = res 22 | elif not cur_line: 23 | cur_line.append(reversed_chunks.pop()) 24 | 25 | @contextmanager 26 | def extra_indent(self, indent: str) -> t.Iterator[None]: 27 | old_initial_indent = self.initial_indent 28 | old_subsequent_indent = self.subsequent_indent 29 | self.initial_indent += indent 30 | self.subsequent_indent += indent 31 | 32 | try: 33 | yield 34 | finally: 35 | self.initial_indent = old_initial_indent 36 | self.subsequent_indent = old_subsequent_indent 37 | 38 | def indent_only(self, text: str) -> str: 39 | rv = [] 40 | 41 | for idx, line in enumerate(text.splitlines()): 42 | indent = self.initial_indent 43 | 44 | if idx > 0: 45 | indent = self.subsequent_indent 46 | 47 | rv.append(f"{indent}{line}") 48 | 49 | return "\n".join(rv) 50 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/click/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/click/py.typed -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/flask-3.1.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/flask-3.1.0.dist-info/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2010 Pallets 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 21 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 24 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/flask-3.1.0.dist-info/REQUESTED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/flask-3.1.0.dist-info/REQUESTED -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/flask-3.1.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: flit 3.10.1 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/flask-3.1.0.dist-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [console_scripts] 2 | flask=flask.cli:main 3 | 4 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/flask/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import main 2 | 3 | main() 4 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/flask/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/flask/py.typed -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/flask/sansio/README.md: -------------------------------------------------------------------------------- 1 | # Sansio 2 | 3 | This folder contains code that can be used by alternative Flask 4 | implementations, for example Quart. The code therefore cannot do any 5 | IO, nor be part of a likely IO path. Finally this code cannot use the 6 | Flask globals. 7 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/flask/signals.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from blinker import Namespace 4 | 5 | # This namespace is only for signals provided by Flask itself. 6 | _signals = Namespace() 7 | 8 | template_rendered = _signals.signal("template-rendered") 9 | before_render_template = _signals.signal("before-render-template") 10 | request_started = _signals.signal("request-started") 11 | request_finished = _signals.signal("request-finished") 12 | request_tearing_down = _signals.signal("request-tearing-down") 13 | got_request_exception = _signals.signal("got-request-exception") 14 | appcontext_tearing_down = _signals.signal("appcontext-tearing-down") 15 | appcontext_pushed = _signals.signal("appcontext-pushed") 16 | appcontext_popped = _signals.signal("appcontext-popped") 17 | message_flashed = _signals.signal("message-flashed") 18 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn-23.0.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn-23.0.0.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | 2009-2024 (c) Benoît Chesneau 2 | 2009-2015 (c) Paul J. Davis 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn-23.0.0.dist-info/REQUESTED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/gunicorn-23.0.0.dist-info/REQUESTED -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn-23.0.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: setuptools (72.1.0) 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | 6 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn-23.0.0.dist-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [console_scripts] 2 | gunicorn = gunicorn.app.wsgiapp:run 3 | 4 | [paste.server_runner] 5 | main = gunicorn.app.pasterapp:serve 6 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn-23.0.0.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | gunicorn 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of gunicorn released under the MIT license. 3 | # See the NOTICE for more information. 4 | 5 | version_info = (23, 0, 0) 6 | __version__ = ".".join([str(v) for v in version_info]) 7 | SERVER = "gunicorn" 8 | SERVER_SOFTWARE = "%s/%s" % (SERVER, __version__) 9 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn/__main__.py: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of gunicorn released under the MIT license. 3 | # See the NOTICE for more information. 4 | 5 | from gunicorn.app.wsgiapp import run 6 | 7 | if __name__ == "__main__": 8 | # see config.py - argparse defaults to basename(argv[0]) == "__main__.py" 9 | # todo: let runpy.run_module take care of argv[0] rewriting 10 | run(prog="gunicorn") 11 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn/app/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of gunicorn released under the MIT license. 3 | # See the NOTICE for more information. 4 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn/errors.py: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of gunicorn released under the MIT license. 3 | # See the NOTICE for more information. 4 | 5 | # We don't need to call super() in __init__ methods of our 6 | # BaseException and Exception classes because we also define 7 | # our own __str__ methods so there is no need to pass 'message' 8 | # to the base class to get a meaningful output from 'str(exc)'. 9 | # pylint: disable=super-init-not-called 10 | 11 | 12 | # we inherit from BaseException here to make sure to not be caught 13 | # at application level 14 | class HaltServer(BaseException): 15 | def __init__(self, reason, exit_status=1): 16 | self.reason = reason 17 | self.exit_status = exit_status 18 | 19 | def __str__(self): 20 | return "" % (self.reason, self.exit_status) 21 | 22 | 23 | class ConfigError(Exception): 24 | """ Exception raised on config error """ 25 | 26 | 27 | class AppImportError(Exception): 28 | """ Exception raised when loading an application """ 29 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn/http/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of gunicorn released under the MIT license. 3 | # See the NOTICE for more information. 4 | 5 | from gunicorn.http.message import Message, Request 6 | from gunicorn.http.parser import RequestParser 7 | 8 | __all__ = ['Message', 'Request', 'RequestParser'] 9 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn/http/parser.py: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of gunicorn released under the MIT license. 3 | # See the NOTICE for more information. 4 | 5 | from gunicorn.http.message import Request 6 | from gunicorn.http.unreader import SocketUnreader, IterUnreader 7 | 8 | 9 | class Parser: 10 | 11 | mesg_class = None 12 | 13 | def __init__(self, cfg, source, source_addr): 14 | self.cfg = cfg 15 | if hasattr(source, "recv"): 16 | self.unreader = SocketUnreader(source) 17 | else: 18 | self.unreader = IterUnreader(source) 19 | self.mesg = None 20 | self.source_addr = source_addr 21 | 22 | # request counter (for keepalive connetions) 23 | self.req_count = 0 24 | 25 | def __iter__(self): 26 | return self 27 | 28 | def __next__(self): 29 | # Stop if HTTP dictates a stop. 30 | if self.mesg and self.mesg.should_close(): 31 | raise StopIteration() 32 | 33 | # Discard any unread body of the previous message 34 | if self.mesg: 35 | data = self.mesg.body.read(8192) 36 | while data: 37 | data = self.mesg.body.read(8192) 38 | 39 | # Parse the next request 40 | self.req_count += 1 41 | self.mesg = self.mesg_class(self.cfg, self.unreader, self.source_addr, self.req_count) 42 | if not self.mesg: 43 | raise StopIteration() 44 | return self.mesg 45 | 46 | next = __next__ 47 | 48 | 49 | class RequestParser(Parser): 50 | 51 | mesg_class = Request 52 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn/instrument/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/gunicorn/instrument/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/gunicorn/workers/__init__.py: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of gunicorn released under the MIT license. 3 | # See the NOTICE for more information. 4 | 5 | # supported gunicorn workers. 6 | SUPPORTED_WORKERS = { 7 | "sync": "gunicorn.workers.sync.SyncWorker", 8 | "eventlet": "gunicorn.workers.geventlet.EventletWorker", 9 | "gevent": "gunicorn.workers.ggevent.GeventWorker", 10 | "gevent_wsgi": "gunicorn.workers.ggevent.GeventPyWSGIWorker", 11 | "gevent_pywsgi": "gunicorn.workers.ggevent.GeventPyWSGIWorker", 12 | "tornado": "gunicorn.workers.gtornado.TornadoWorker", 13 | "gthread": "gunicorn.workers.gthread.ThreadWorker", 14 | } 15 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/itsdangerous-2.2.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/itsdangerous-2.2.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: flit 3.9.0 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/itsdangerous/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import typing as t 4 | 5 | from .encoding import base64_decode as base64_decode 6 | from .encoding import base64_encode as base64_encode 7 | from .encoding import want_bytes as want_bytes 8 | from .exc import BadData as BadData 9 | from .exc import BadHeader as BadHeader 10 | from .exc import BadPayload as BadPayload 11 | from .exc import BadSignature as BadSignature 12 | from .exc import BadTimeSignature as BadTimeSignature 13 | from .exc import SignatureExpired as SignatureExpired 14 | from .serializer import Serializer as Serializer 15 | from .signer import HMACAlgorithm as HMACAlgorithm 16 | from .signer import NoneAlgorithm as NoneAlgorithm 17 | from .signer import Signer as Signer 18 | from .timed import TimedSerializer as TimedSerializer 19 | from .timed import TimestampSigner as TimestampSigner 20 | from .url_safe import URLSafeSerializer as URLSafeSerializer 21 | from .url_safe import URLSafeTimedSerializer as URLSafeTimedSerializer 22 | 23 | 24 | def __getattr__(name: str) -> t.Any: 25 | if name == "__version__": 26 | import importlib.metadata 27 | import warnings 28 | 29 | warnings.warn( 30 | "The '__version__' attribute is deprecated and will be removed in" 31 | " ItsDangerous 2.3. Use feature detection or" 32 | " 'importlib.metadata.version(\"itsdangerous\")' instead.", 33 | DeprecationWarning, 34 | stacklevel=2, 35 | ) 36 | return importlib.metadata.version("itsdangerous") 37 | 38 | raise AttributeError(name) 39 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/itsdangerous/_json.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | import json as _json 4 | import typing as t 5 | 6 | 7 | class _CompactJSON: 8 | """Wrapper around json module that strips whitespace.""" 9 | 10 | @staticmethod 11 | def loads(payload: str | bytes) -> t.Any: 12 | return _json.loads(payload) 13 | 14 | @staticmethod 15 | def dumps(obj: t.Any, **kwargs: t.Any) -> str: 16 | kwargs.setdefault("ensure_ascii", False) 17 | kwargs.setdefault("separators", (",", ":")) 18 | return _json.dumps(obj, **kwargs) 19 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/itsdangerous/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/itsdangerous/py.typed -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/jinja2-3.1.5.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/jinja2-3.1.5.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: flit 3.10.1 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/jinja2-3.1.5.dist-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [babel.extractors] 2 | jinja2=jinja2.ext:babel_extract[i18n] 3 | 4 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/jinja2/_identifier.py: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # generated by scripts/generate_identifier_pattern.py 4 | pattern = re.compile( 5 | r"[\w·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣ৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఄా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-᪽ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰℘℮⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯︳︴﹍-﹏_𐇽𐋠𐍶-𐍺𐨁-𐨃𐨅𐨆𐨌-𐨏𐨸-𐨿𐨺𐫦𐫥𐴤-𐽆𐴧-𐽐𑀀-𑀂𑀸-𑁆𑁿-𑂂𑂰-𑂺𑄀-𑄂𑄧-𑄴𑅅𑅆𑅳𑆀-𑆂𑆳-𑇀𑇉-𑇌𑈬-𑈷𑈾𑋟-𑋪𑌀-𑌃𑌻𑌼𑌾-𑍄𑍇𑍈𑍋-𑍍𑍗𑍢𑍣𑍦-𑍬𑍰-𑍴𑐵-𑑆𑑞𑒰-𑓃𑖯-𑖵𑖸-𑗀𑗜𑗝𑘰-𑙀𑚫-𑚷𑜝-𑜫𑠬-𑠺𑨁-𑨊𑨳-𑨹𑨻-𑨾𑩇𑩑-𑩛𑪊-𑪙𑰯-𑰶𑰸-𑰿𑲒-𑲧𑲩-𑲶𑴱-𑴶𑴺𑴼𑴽𑴿-𑵅𑵇𑶊-𑶎𑶐𑶑𑶓-𑶗𑻳-𑻶𖫰-𖫴𖬰-𖬶𖽑-𖽾𖾏-𖾒𛲝𛲞𝅥-𝅩𝅭-𝅲𝅻-𝆂𝆅-𝆋𝆪-𝆭𝉂-𝉄𝨀-𝨶𝨻-𝩬𝩵𝪄𝪛-𝪟𝪡-𝪯𞀀-𞀆𞀈-𞀘𞀛-𞀡𞀣𞀤𞀦-𞣐𞀪-𞣖𞥄-𞥊󠄀-󠇯]+" # noqa: B950 6 | ) 7 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/jinja2/constants.py: -------------------------------------------------------------------------------- 1 | #: list of lorem ipsum words used by the lipsum() helper function 2 | LOREM_IPSUM_WORDS = """\ 3 | a ac accumsan ad adipiscing aenean aliquam aliquet amet ante aptent arcu at 4 | auctor augue bibendum blandit class commodo condimentum congue consectetuer 5 | consequat conubia convallis cras cubilia cum curabitur curae cursus dapibus 6 | diam dictum dictumst dignissim dis dolor donec dui duis egestas eget eleifend 7 | elementum elit enim erat eros est et etiam eu euismod facilisi facilisis fames 8 | faucibus felis fermentum feugiat fringilla fusce gravida habitant habitasse hac 9 | hendrerit hymenaeos iaculis id imperdiet in inceptos integer interdum ipsum 10 | justo lacinia lacus laoreet lectus leo libero ligula litora lobortis lorem 11 | luctus maecenas magna magnis malesuada massa mattis mauris metus mi molestie 12 | mollis montes morbi mus nam nascetur natoque nec neque netus nibh nisi nisl non 13 | nonummy nostra nulla nullam nunc odio orci ornare parturient pede pellentesque 14 | penatibus per pharetra phasellus placerat platea porta porttitor posuere 15 | potenti praesent pretium primis proin pulvinar purus quam quis quisque rhoncus 16 | ridiculus risus rutrum sagittis sapien scelerisque sed sem semper senectus sit 17 | sociis sociosqu sodales sollicitudin suscipit suspendisse taciti tellus tempor 18 | tempus tincidunt torquent tortor tristique turpis ullamcorper ultrices 19 | ultricies urna ut varius vehicula vel velit venenatis vestibulum vitae vivamus 20 | viverra volutpat vulputate""" 21 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/jinja2/defaults.py: -------------------------------------------------------------------------------- 1 | import typing as t 2 | 3 | from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401 4 | from .tests import TESTS as DEFAULT_TESTS # noqa: F401 5 | from .utils import Cycler 6 | from .utils import generate_lorem_ipsum 7 | from .utils import Joiner 8 | from .utils import Namespace 9 | 10 | if t.TYPE_CHECKING: 11 | import typing_extensions as te 12 | 13 | # defaults for the parser / lexer 14 | BLOCK_START_STRING = "{%" 15 | BLOCK_END_STRING = "%}" 16 | VARIABLE_START_STRING = "{{" 17 | VARIABLE_END_STRING = "}}" 18 | COMMENT_START_STRING = "{#" 19 | COMMENT_END_STRING = "#}" 20 | LINE_STATEMENT_PREFIX: t.Optional[str] = None 21 | LINE_COMMENT_PREFIX: t.Optional[str] = None 22 | TRIM_BLOCKS = False 23 | LSTRIP_BLOCKS = False 24 | NEWLINE_SEQUENCE: "te.Literal['\\n', '\\r\\n', '\\r']" = "\n" 25 | KEEP_TRAILING_NEWLINE = False 26 | 27 | # default filters, tests and namespace 28 | 29 | DEFAULT_NAMESPACE = { 30 | "range": range, 31 | "dict": dict, 32 | "lipsum": generate_lorem_ipsum, 33 | "cycler": Cycler, 34 | "joiner": Joiner, 35 | "namespace": Namespace, 36 | } 37 | 38 | # default policies 39 | DEFAULT_POLICIES: t.Dict[str, t.Any] = { 40 | "compiler.ascii_str": True, 41 | "urlize.rel": "noopener", 42 | "urlize.target": None, 43 | "urlize.extra_schemes": None, 44 | "truncate.leeway": 5, 45 | "json.dumps_function": None, 46 | "json.dumps_kwargs": {"sort_keys": True}, 47 | "ext.i18n.trimmed": False, 48 | } 49 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/jinja2/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/jinja2/py.typed -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/markupsafe/_native.py: -------------------------------------------------------------------------------- 1 | def _escape_inner(s: str, /) -> str: 2 | return ( 3 | s.replace("&", "&") 4 | .replace(">", ">") 5 | .replace("<", "<") 6 | .replace("'", "'") 7 | .replace('"', """) 8 | ) 9 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/markupsafe/_speedups.cpython-312-x86_64-linux-gnu.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/markupsafe/_speedups.cpython-312-x86_64-linux-gnu.so -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/markupsafe/_speedups.pyi: -------------------------------------------------------------------------------- 1 | def _escape_inner(s: str, /) -> str: ... 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/markupsafe/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/markupsafe/py.typed -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/packaging-24.2.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/packaging-24.2.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | This software is made available under the terms of *either* of the licenses 2 | found in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made 3 | under the terms of *both* these licenses. 4 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/packaging-24.2.dist-info/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Copyright (c) Donald Stufft and individual contributors. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/packaging-24.2.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: flit 3.10.1 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/packaging/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | 5 | __title__ = "packaging" 6 | __summary__ = "Core utilities for Python packages" 7 | __uri__ = "https://github.com/pypa/packaging" 8 | 9 | __version__ = "24.2" 10 | 11 | __author__ = "Donald Stufft and individual contributors" 12 | __email__ = "donald@stufft.io" 13 | 14 | __license__ = "BSD-2-Clause or Apache-2.0" 15 | __copyright__ = f"2014 {__author__}" 16 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/packaging/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/packaging/py.typed -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip-24.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip-24.0.dist-info/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-present The pip developers (see AUTHORS.txt file) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip-24.0.dist-info/REQUESTED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip-24.0.dist-info/REQUESTED -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip-24.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.42.0) 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | 6 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip-24.0.dist-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [console_scripts] 2 | pip = pip._internal.cli.main:main 3 | pip3 = pip._internal.cli.main:main 4 | pip3.12 = pip._internal.cli.main:main 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip-24.0.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import List, Optional 2 | 3 | __version__ = "24.0" 4 | 5 | 6 | def main(args: Optional[List[str]] = None) -> int: 7 | """This is an internal API only meant for use by pip's own console scripts. 8 | 9 | For additional details, see https://github.com/pypa/pip/issues/7498. 10 | """ 11 | from pip._internal.utils.entrypoints import _wrapper 12 | 13 | return _wrapper(args) 14 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/__main__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | # Remove '' and current working directory from the first entry 5 | # of sys.path, if present to avoid using current directory 6 | # in pip commands check, freeze, install, list and show, 7 | # when invoked as python -m pip 8 | if sys.path[0] in ("", os.getcwd()): 9 | sys.path.pop(0) 10 | 11 | # If we are running from a wheel, add the wheel to sys.path 12 | # This allows the usage python pip-*.whl/pip install pip-*.whl 13 | if __package__ == "": 14 | # __file__ is pip-*.whl/pip/__main__.py 15 | # first dirname call strips of '/__main__.py', second strips off '/pip' 16 | # Resulting path is the name of the wheel itself 17 | # Add that to sys.path so we can import pip 18 | path = os.path.dirname(os.path.dirname(__file__)) 19 | sys.path.insert(0, path) 20 | 21 | if __name__ == "__main__": 22 | from pip._internal.cli.main import main as _main 23 | 24 | sys.exit(_main()) 25 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/__init__.py: -------------------------------------------------------------------------------- 1 | from typing import List, Optional 2 | 3 | from pip._internal.utils import _log 4 | 5 | # init_logging() must be called before any call to logging.getLogger() 6 | # which happens at import of most modules. 7 | _log.init_logging() 8 | 9 | 10 | def main(args: (Optional[List[str]]) = None) -> int: 11 | """This is preserved for old console scripts that may still be referencing 12 | it. 13 | 14 | For additional details, see https://github.com/pypa/pip/issues/7498. 15 | """ 16 | from pip._internal.utils.entrypoints import _wrapper 17 | 18 | return _wrapper(args) 19 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/cli/__init__.py: -------------------------------------------------------------------------------- 1 | """Subpackage containing all of pip's command line interface related code 2 | """ 3 | 4 | # This file intentionally does not import submodules 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/cli/command_context.py: -------------------------------------------------------------------------------- 1 | from contextlib import ExitStack, contextmanager 2 | from typing import ContextManager, Generator, TypeVar 3 | 4 | _T = TypeVar("_T", covariant=True) 5 | 6 | 7 | class CommandContextMixIn: 8 | def __init__(self) -> None: 9 | super().__init__() 10 | self._in_main_context = False 11 | self._main_context = ExitStack() 12 | 13 | @contextmanager 14 | def main_context(self) -> Generator[None, None, None]: 15 | assert not self._in_main_context 16 | 17 | self._in_main_context = True 18 | try: 19 | with self._main_context: 20 | yield 21 | finally: 22 | self._in_main_context = False 23 | 24 | def enter_context(self, context_provider: ContextManager[_T]) -> _T: 25 | assert self._in_main_context 26 | 27 | return self._main_context.enter_context(context_provider) 28 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/cli/status_codes.py: -------------------------------------------------------------------------------- 1 | SUCCESS = 0 2 | ERROR = 1 3 | UNKNOWN_ERROR = 2 4 | VIRTUALENV_NOT_FOUND = 3 5 | PREVIOUS_BUILD_DIR_ERROR = 4 6 | NO_MATCHES_FOUND = 23 7 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/commands/help.py: -------------------------------------------------------------------------------- 1 | from optparse import Values 2 | from typing import List 3 | 4 | from pip._internal.cli.base_command import Command 5 | from pip._internal.cli.status_codes import SUCCESS 6 | from pip._internal.exceptions import CommandError 7 | 8 | 9 | class HelpCommand(Command): 10 | """Show help for commands""" 11 | 12 | usage = """ 13 | %prog """ 14 | ignore_require_venv = True 15 | 16 | def run(self, options: Values, args: List[str]) -> int: 17 | from pip._internal.commands import ( 18 | commands_dict, 19 | create_command, 20 | get_similar_commands, 21 | ) 22 | 23 | try: 24 | # 'pip help' with no args is handled by pip.__init__.parseopt() 25 | cmd_name = args[0] # the command we need help for 26 | except IndexError: 27 | return SUCCESS 28 | 29 | if cmd_name not in commands_dict: 30 | guess = get_similar_commands(cmd_name) 31 | 32 | msg = [f'unknown command "{cmd_name}"'] 33 | if guess: 34 | msg.append(f'maybe you meant "{guess}"') 35 | 36 | raise CommandError(" - ".join(msg)) 37 | 38 | command = create_command(cmd_name) 39 | command.parser.print_help() 40 | 41 | return SUCCESS 42 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/distributions/__init__.py: -------------------------------------------------------------------------------- 1 | from pip._internal.distributions.base import AbstractDistribution 2 | from pip._internal.distributions.sdist import SourceDistribution 3 | from pip._internal.distributions.wheel import WheelDistribution 4 | from pip._internal.req.req_install import InstallRequirement 5 | 6 | 7 | def make_distribution_for_install_requirement( 8 | install_req: InstallRequirement, 9 | ) -> AbstractDistribution: 10 | """Returns a Distribution for the given InstallRequirement""" 11 | # Editable requirements will always be source distributions. They use the 12 | # legacy logic until we create a modern standard for them. 13 | if install_req.editable: 14 | return SourceDistribution(install_req) 15 | 16 | # If it's a wheel, it's a WheelDistribution 17 | if install_req.is_wheel: 18 | return WheelDistribution(install_req) 19 | 20 | # Otherwise, a SourceDistribution 21 | return SourceDistribution(install_req) 22 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/distributions/installed.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | from pip._internal.distributions.base import AbstractDistribution 4 | from pip._internal.index.package_finder import PackageFinder 5 | from pip._internal.metadata import BaseDistribution 6 | 7 | 8 | class InstalledDistribution(AbstractDistribution): 9 | """Represents an installed package. 10 | 11 | This does not need any preparation as the required information has already 12 | been computed. 13 | """ 14 | 15 | @property 16 | def build_tracker_id(self) -> Optional[str]: 17 | return None 18 | 19 | def get_metadata_distribution(self) -> BaseDistribution: 20 | assert self.req.satisfied_by is not None, "not actually installed" 21 | return self.req.satisfied_by 22 | 23 | def prepare_distribution_metadata( 24 | self, 25 | finder: PackageFinder, 26 | build_isolation: bool, 27 | check_build_deps: bool, 28 | ) -> None: 29 | pass 30 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/distributions/wheel.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | from pip._vendor.packaging.utils import canonicalize_name 4 | 5 | from pip._internal.distributions.base import AbstractDistribution 6 | from pip._internal.index.package_finder import PackageFinder 7 | from pip._internal.metadata import ( 8 | BaseDistribution, 9 | FilesystemWheel, 10 | get_wheel_distribution, 11 | ) 12 | 13 | 14 | class WheelDistribution(AbstractDistribution): 15 | """Represents a wheel distribution. 16 | 17 | This does not need any preparation as wheels can be directly unpacked. 18 | """ 19 | 20 | @property 21 | def build_tracker_id(self) -> Optional[str]: 22 | return None 23 | 24 | def get_metadata_distribution(self) -> BaseDistribution: 25 | """Loads the metadata from the wheel file into memory and returns a 26 | Distribution that uses it, not relying on the wheel file or 27 | requirement. 28 | """ 29 | assert self.req.local_file_path, "Set as part of preparation during download" 30 | assert self.req.name, "Wheels are never unnamed" 31 | wheel = FilesystemWheel(self.req.local_file_path) 32 | return get_wheel_distribution(wheel, canonicalize_name(self.req.name)) 33 | 34 | def prepare_distribution_metadata( 35 | self, 36 | finder: PackageFinder, 37 | build_isolation: bool, 38 | check_build_deps: bool, 39 | ) -> None: 40 | pass 41 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/index/__init__.py: -------------------------------------------------------------------------------- 1 | """Index interaction code 2 | """ 3 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/main.py: -------------------------------------------------------------------------------- 1 | from typing import List, Optional 2 | 3 | 4 | def main(args: Optional[List[str]] = None) -> int: 5 | """This is preserved for old console scripts that may still be referencing 6 | it. 7 | 8 | For additional details, see https://github.com/pypa/pip/issues/7498. 9 | """ 10 | from pip._internal.utils.entrypoints import _wrapper 11 | 12 | return _wrapper(args) 13 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__init__.py: -------------------------------------------------------------------------------- 1 | from ._dists import Distribution 2 | from ._envs import Environment 3 | 4 | __all__ = ["NAME", "Distribution", "Environment"] 5 | 6 | NAME = "importlib" 7 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/models/__init__.py: -------------------------------------------------------------------------------- 1 | """A package that contains models that represent entities. 2 | """ 3 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/models/candidate.py: -------------------------------------------------------------------------------- 1 | from pip._vendor.packaging.version import parse as parse_version 2 | 3 | from pip._internal.models.link import Link 4 | from pip._internal.utils.models import KeyBasedCompareMixin 5 | 6 | 7 | class InstallationCandidate(KeyBasedCompareMixin): 8 | """Represents a potential "candidate" for installation.""" 9 | 10 | __slots__ = ["name", "version", "link"] 11 | 12 | def __init__(self, name: str, version: str, link: Link) -> None: 13 | self.name = name 14 | self.version = parse_version(version) 15 | self.link = link 16 | 17 | super().__init__( 18 | key=(self.name, self.version, self.link), 19 | defining_class=InstallationCandidate, 20 | ) 21 | 22 | def __repr__(self) -> str: 23 | return "".format( 24 | self.name, 25 | self.version, 26 | self.link, 27 | ) 28 | 29 | def __str__(self) -> str: 30 | return f"{self.name!r} candidate (version {self.version} at {self.link})" 31 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/models/index.py: -------------------------------------------------------------------------------- 1 | import urllib.parse 2 | 3 | 4 | class PackageIndex: 5 | """Represents a Package Index and provides easier access to endpoints""" 6 | 7 | __slots__ = ["url", "netloc", "simple_url", "pypi_url", "file_storage_domain"] 8 | 9 | def __init__(self, url: str, file_storage_domain: str) -> None: 10 | super().__init__() 11 | self.url = url 12 | self.netloc = urllib.parse.urlsplit(url).netloc 13 | self.simple_url = self._url_for_path("simple") 14 | self.pypi_url = self._url_for_path("pypi") 15 | 16 | # This is part of a temporary hack used to block installs of PyPI 17 | # packages which depend on external urls only necessary until PyPI can 18 | # block such packages themselves 19 | self.file_storage_domain = file_storage_domain 20 | 21 | def _url_for_path(self, path: str) -> str: 22 | return urllib.parse.urljoin(self.url, path) 23 | 24 | 25 | PyPI = PackageIndex("https://pypi.org/", file_storage_domain="files.pythonhosted.org") 26 | TestPyPI = PackageIndex( 27 | "https://test.pypi.org/", file_storage_domain="test-files.pythonhosted.org" 28 | ) 29 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/models/scheme.py: -------------------------------------------------------------------------------- 1 | """ 2 | For types associated with installation schemes. 3 | 4 | For a general overview of available schemes and their context, see 5 | https://docs.python.org/3/install/index.html#alternate-installation. 6 | """ 7 | 8 | 9 | SCHEME_KEYS = ["platlib", "purelib", "headers", "scripts", "data"] 10 | 11 | 12 | class Scheme: 13 | """A Scheme holds paths which are used as the base directories for 14 | artifacts associated with a Python package. 15 | """ 16 | 17 | __slots__ = SCHEME_KEYS 18 | 19 | def __init__( 20 | self, 21 | platlib: str, 22 | purelib: str, 23 | headers: str, 24 | scripts: str, 25 | data: str, 26 | ) -> None: 27 | self.platlib = platlib 28 | self.purelib = purelib 29 | self.headers = headers 30 | self.scripts = scripts 31 | self.data = data 32 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/network/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains purely network-related utilities. 2 | """ 3 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/operations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_internal/operations/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/operations/build/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_internal/operations/build/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/operations/build/wheel.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import os 3 | from typing import Optional 4 | 5 | from pip._vendor.pyproject_hooks import BuildBackendHookCaller 6 | 7 | from pip._internal.utils.subprocess import runner_with_spinner_message 8 | 9 | logger = logging.getLogger(__name__) 10 | 11 | 12 | def build_wheel_pep517( 13 | name: str, 14 | backend: BuildBackendHookCaller, 15 | metadata_directory: str, 16 | tempd: str, 17 | ) -> Optional[str]: 18 | """Build one InstallRequirement using the PEP 517 build process. 19 | 20 | Returns path to wheel if successfully built. Otherwise, returns None. 21 | """ 22 | assert metadata_directory is not None 23 | try: 24 | logger.debug("Destination directory: %s", tempd) 25 | 26 | runner = runner_with_spinner_message( 27 | f"Building wheel for {name} (pyproject.toml)" 28 | ) 29 | with backend.subprocess_runner(runner): 30 | wheel_name = backend.build_wheel( 31 | tempd, 32 | metadata_directory=metadata_directory, 33 | ) 34 | except Exception: 35 | logger.error("Failed building wheel for %s", name) 36 | return None 37 | return os.path.join(tempd, wheel_name) 38 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/operations/install/__init__.py: -------------------------------------------------------------------------------- 1 | """For modules related to installing packages. 2 | """ 3 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/operations/install/editable_legacy.py: -------------------------------------------------------------------------------- 1 | """Legacy editable installation process, i.e. `setup.py develop`. 2 | """ 3 | import logging 4 | from typing import Optional, Sequence 5 | 6 | from pip._internal.build_env import BuildEnvironment 7 | from pip._internal.utils.logging import indent_log 8 | from pip._internal.utils.setuptools_build import make_setuptools_develop_args 9 | from pip._internal.utils.subprocess import call_subprocess 10 | 11 | logger = logging.getLogger(__name__) 12 | 13 | 14 | def install_editable( 15 | *, 16 | global_options: Sequence[str], 17 | prefix: Optional[str], 18 | home: Optional[str], 19 | use_user_site: bool, 20 | name: str, 21 | setup_py_path: str, 22 | isolated: bool, 23 | build_env: BuildEnvironment, 24 | unpacked_source_directory: str, 25 | ) -> None: 26 | """Install a package in editable mode. Most arguments are pass-through 27 | to setuptools. 28 | """ 29 | logger.info("Running setup.py develop for %s", name) 30 | 31 | args = make_setuptools_develop_args( 32 | setup_py_path, 33 | global_options=global_options, 34 | no_user_config=isolated, 35 | prefix=prefix, 36 | home=home, 37 | use_user_site=use_user_site, 38 | ) 39 | 40 | with indent_log(): 41 | with build_env: 42 | call_subprocess( 43 | args, 44 | command_desc="python setup.py develop", 45 | cwd=unpacked_source_directory, 46 | ) 47 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/resolution/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_internal/resolution/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/resolution/base.py: -------------------------------------------------------------------------------- 1 | from typing import Callable, List, Optional 2 | 3 | from pip._internal.req.req_install import InstallRequirement 4 | from pip._internal.req.req_set import RequirementSet 5 | 6 | InstallRequirementProvider = Callable[ 7 | [str, Optional[InstallRequirement]], InstallRequirement 8 | ] 9 | 10 | 11 | class BaseResolver: 12 | def resolve( 13 | self, root_reqs: List[InstallRequirement], check_supported_wheels: bool 14 | ) -> RequirementSet: 15 | raise NotImplementedError() 16 | 17 | def get_installation_order( 18 | self, req_set: RequirementSet 19 | ) -> List[InstallRequirement]: 20 | raise NotImplementedError() 21 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_internal/utils/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/utils/_log.py: -------------------------------------------------------------------------------- 1 | """Customize logging 2 | 3 | Defines custom logger class for the `logger.verbose(...)` method. 4 | 5 | init_logging() must be called before any other modules that call logging.getLogger. 6 | """ 7 | 8 | import logging 9 | from typing import Any, cast 10 | 11 | # custom log level for `--verbose` output 12 | # between DEBUG and INFO 13 | VERBOSE = 15 14 | 15 | 16 | class VerboseLogger(logging.Logger): 17 | """Custom Logger, defining a verbose log-level 18 | 19 | VERBOSE is between INFO and DEBUG. 20 | """ 21 | 22 | def verbose(self, msg: str, *args: Any, **kwargs: Any) -> None: 23 | return self.log(VERBOSE, msg, *args, **kwargs) 24 | 25 | 26 | def getLogger(name: str) -> VerboseLogger: 27 | """logging.getLogger, but ensures our VerboseLogger class is returned""" 28 | return cast(VerboseLogger, logging.getLogger(name)) 29 | 30 | 31 | def init_logging() -> None: 32 | """Register our VerboseLogger and VERBOSE log level. 33 | 34 | Should be called before any calls to getLogger(), 35 | i.e. in pip._internal.__init__ 36 | """ 37 | logging.setLoggerClass(VerboseLogger) 38 | logging.addLevelName(VERBOSE, "VERBOSE") 39 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/utils/datetime.py: -------------------------------------------------------------------------------- 1 | """For when pip wants to check the date or time. 2 | """ 3 | 4 | import datetime 5 | 6 | 7 | def today_is_later_than(year: int, month: int, day: int) -> bool: 8 | today = datetime.date.today() 9 | given = datetime.date(year, month, day) 10 | 11 | return today > given 12 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/utils/encoding.py: -------------------------------------------------------------------------------- 1 | import codecs 2 | import locale 3 | import re 4 | import sys 5 | from typing import List, Tuple 6 | 7 | BOMS: List[Tuple[bytes, str]] = [ 8 | (codecs.BOM_UTF8, "utf-8"), 9 | (codecs.BOM_UTF16, "utf-16"), 10 | (codecs.BOM_UTF16_BE, "utf-16-be"), 11 | (codecs.BOM_UTF16_LE, "utf-16-le"), 12 | (codecs.BOM_UTF32, "utf-32"), 13 | (codecs.BOM_UTF32_BE, "utf-32-be"), 14 | (codecs.BOM_UTF32_LE, "utf-32-le"), 15 | ] 16 | 17 | ENCODING_RE = re.compile(rb"coding[:=]\s*([-\w.]+)") 18 | 19 | 20 | def auto_decode(data: bytes) -> str: 21 | """Check a bytes string for a BOM to correctly detect the encoding 22 | 23 | Fallback to locale.getpreferredencoding(False) like open() on Python3""" 24 | for bom, encoding in BOMS: 25 | if data.startswith(bom): 26 | return data[len(bom) :].decode(encoding) 27 | # Lets check the first two lines as in PEP263 28 | for line in data.split(b"\n")[:2]: 29 | if line[0:1] == b"#" and ENCODING_RE.search(line): 30 | result = ENCODING_RE.search(line) 31 | assert result is not None 32 | encoding = result.groups()[0].decode("ascii") 33 | return data.decode(encoding) 34 | return data.decode( 35 | locale.getpreferredencoding(False) or sys.getdefaultencoding(), 36 | ) 37 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/utils/filetypes.py: -------------------------------------------------------------------------------- 1 | """Filetype information. 2 | """ 3 | 4 | from typing import Tuple 5 | 6 | from pip._internal.utils.misc import splitext 7 | 8 | WHEEL_EXTENSION = ".whl" 9 | BZ2_EXTENSIONS: Tuple[str, ...] = (".tar.bz2", ".tbz") 10 | XZ_EXTENSIONS: Tuple[str, ...] = ( 11 | ".tar.xz", 12 | ".txz", 13 | ".tlz", 14 | ".tar.lz", 15 | ".tar.lzma", 16 | ) 17 | ZIP_EXTENSIONS: Tuple[str, ...] = (".zip", WHEEL_EXTENSION) 18 | TAR_EXTENSIONS: Tuple[str, ...] = (".tar.gz", ".tgz", ".tar") 19 | ARCHIVE_EXTENSIONS = ZIP_EXTENSIONS + BZ2_EXTENSIONS + TAR_EXTENSIONS + XZ_EXTENSIONS 20 | 21 | 22 | def is_archive_file(name: str) -> bool: 23 | """Return True if `name` is a considered as an archive file.""" 24 | ext = splitext(name)[1].lower() 25 | if ext in ARCHIVE_EXTENSIONS: 26 | return True 27 | return False 28 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/utils/models.py: -------------------------------------------------------------------------------- 1 | """Utilities for defining models 2 | """ 3 | 4 | import operator 5 | from typing import Any, Callable, Type 6 | 7 | 8 | class KeyBasedCompareMixin: 9 | """Provides comparison capabilities that is based on a key""" 10 | 11 | __slots__ = ["_compare_key", "_defining_class"] 12 | 13 | def __init__(self, key: Any, defining_class: Type["KeyBasedCompareMixin"]) -> None: 14 | self._compare_key = key 15 | self._defining_class = defining_class 16 | 17 | def __hash__(self) -> int: 18 | return hash(self._compare_key) 19 | 20 | def __lt__(self, other: Any) -> bool: 21 | return self._compare(other, operator.__lt__) 22 | 23 | def __le__(self, other: Any) -> bool: 24 | return self._compare(other, operator.__le__) 25 | 26 | def __gt__(self, other: Any) -> bool: 27 | return self._compare(other, operator.__gt__) 28 | 29 | def __ge__(self, other: Any) -> bool: 30 | return self._compare(other, operator.__ge__) 31 | 32 | def __eq__(self, other: Any) -> bool: 33 | return self._compare(other, operator.__eq__) 34 | 35 | def _compare(self, other: Any, method: Callable[[Any, Any], bool]) -> bool: 36 | if not isinstance(other, self._defining_class): 37 | return NotImplemented 38 | 39 | return method(self._compare_key, other._compare_key) 40 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_internal/vcs/__init__.py: -------------------------------------------------------------------------------- 1 | # Expose a limited set of classes and functions so callers outside of 2 | # the vcs package don't need to import deeper than `pip._internal.vcs`. 3 | # (The test directory may still need to import from a vcs sub-package.) 4 | # Import all vcs modules to register each VCS in the VcsSupport object. 5 | import pip._internal.vcs.bazaar 6 | import pip._internal.vcs.git 7 | import pip._internal.vcs.mercurial 8 | import pip._internal.vcs.subversion # noqa: F401 9 | from pip._internal.vcs.versioncontrol import ( # noqa: F401 10 | RemoteNotFoundError, 11 | RemoteNotValidError, 12 | is_url, 13 | make_vcs_requirement_url, 14 | vcs, 15 | ) 16 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__init__.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2015 Eric Larson 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | """CacheControl import Interface. 6 | 7 | Make it easy to import from cachecontrol without long namespaces. 8 | """ 9 | __author__ = "Eric Larson" 10 | __email__ = "eric@ionrock.org" 11 | __version__ = "0.13.1" 12 | 13 | from pip._vendor.cachecontrol.adapter import CacheControlAdapter 14 | from pip._vendor.cachecontrol.controller import CacheController 15 | from pip._vendor.cachecontrol.wrapper import CacheControl 16 | 17 | __all__ = [ 18 | "__author__", 19 | "__email__", 20 | "__version__", 21 | "CacheControlAdapter", 22 | "CacheController", 23 | "CacheControl", 24 | ] 25 | 26 | import logging 27 | 28 | logging.getLogger(__name__).addHandler(logging.NullHandler()) 29 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__init__.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2015 Eric Larson 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | from pip._vendor.cachecontrol.caches.file_cache import FileCache, SeparateBodyFileCache 6 | from pip._vendor.cachecontrol.caches.redis_cache import RedisCache 7 | 8 | __all__ = ["FileCache", "SeparateBodyFileCache", "RedisCache"] 9 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/certifi/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import contents, where 2 | 3 | __all__ = ["contents", "where"] 4 | __version__ = "2023.07.22" 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/certifi/__main__.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | from pip._vendor.certifi import contents, where 4 | 5 | parser = argparse.ArgumentParser() 6 | parser.add_argument("-c", "--contents", action="store_true") 7 | args = parser.parse_args() 8 | 9 | if args.contents: 10 | print(contents()) 11 | else: 12 | print(where()) 13 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/chardet/cli/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/chardet/cli/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/chardet/codingstatemachinedict.py: -------------------------------------------------------------------------------- 1 | from typing import TYPE_CHECKING, Tuple 2 | 3 | if TYPE_CHECKING: 4 | # TypedDict was introduced in Python 3.8. 5 | # 6 | # TODO: Remove the else block and TYPE_CHECKING check when dropping support 7 | # for Python 3.7. 8 | from typing import TypedDict 9 | 10 | class CodingStateMachineDict(TypedDict, total=False): 11 | class_table: Tuple[int, ...] 12 | class_factor: int 13 | state_table: Tuple[int, ...] 14 | char_len_table: Tuple[int, ...] 15 | name: str 16 | language: str # Optional key 17 | 18 | else: 19 | CodingStateMachineDict = dict 20 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/chardet/metadata/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/chardet/metadata/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/chardet/resultdict.py: -------------------------------------------------------------------------------- 1 | from typing import TYPE_CHECKING, Optional 2 | 3 | if TYPE_CHECKING: 4 | # TypedDict was introduced in Python 3.8. 5 | # 6 | # TODO: Remove the else block and TYPE_CHECKING check when dropping support 7 | # for Python 3.7. 8 | from typing import TypedDict 9 | 10 | class ResultDict(TypedDict): 11 | encoding: Optional[str] 12 | confidence: float 13 | language: Optional[str] 14 | 15 | else: 16 | ResultDict = dict 17 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/chardet/version.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module exists only to simplify retrieving the version number of chardet 3 | from within setuptools and from chardet subpackages. 4 | 5 | :author: Dan Blanchard (dan.blanchard@gmail.com) 6 | """ 7 | 8 | __version__ = "5.1.0" 9 | VERSION = __version__.split(".") 10 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/colorama/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. 2 | from .initialise import init, deinit, reinit, colorama_text, just_fix_windows_console 3 | from .ansi import Fore, Back, Style, Cursor 4 | from .ansitowin32 import AnsiToWin32 5 | 6 | __version__ = '0.4.6' 7 | 8 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/colorama/tests/utils.py: -------------------------------------------------------------------------------- 1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. 2 | from contextlib import contextmanager 3 | from io import StringIO 4 | import sys 5 | import os 6 | 7 | 8 | class StreamTTY(StringIO): 9 | def isatty(self): 10 | return True 11 | 12 | class StreamNonTTY(StringIO): 13 | def isatty(self): 14 | return False 15 | 16 | @contextmanager 17 | def osname(name): 18 | orig = os.name 19 | os.name = name 20 | yield 21 | os.name = orig 22 | 23 | @contextmanager 24 | def replace_by(stream): 25 | orig_stdout = sys.stdout 26 | orig_stderr = sys.stderr 27 | sys.stdout = stream 28 | sys.stderr = stream 29 | yield 30 | sys.stdout = orig_stdout 31 | sys.stderr = orig_stderr 32 | 33 | @contextmanager 34 | def replace_original_by(stream): 35 | orig_stdout = sys.__stdout__ 36 | orig_stderr = sys.__stderr__ 37 | sys.__stdout__ = stream 38 | sys.__stderr__ = stream 39 | yield 40 | sys.__stdout__ = orig_stdout 41 | sys.__stderr__ = orig_stderr 42 | 43 | @contextmanager 44 | def pycharm(): 45 | os.environ["PYCHARM_HOSTED"] = "1" 46 | non_tty = StreamNonTTY() 47 | with replace_by(non_tty), replace_original_by(non_tty): 48 | yield 49 | del os.environ["PYCHARM_HOSTED"] 50 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/distlib/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright (C) 2012-2023 Vinay Sajip. 4 | # Licensed to the Python Software Foundation under a contributor agreement. 5 | # See LICENSE.txt and CONTRIBUTORS.txt. 6 | # 7 | import logging 8 | 9 | __version__ = '0.3.8' 10 | 11 | 12 | class DistlibException(Exception): 13 | pass 14 | 15 | 16 | try: 17 | from logging import NullHandler 18 | except ImportError: # pragma: no cover 19 | 20 | class NullHandler(logging.Handler): 21 | 22 | def handle(self, record): 23 | pass 24 | 25 | def emit(self, record): 26 | pass 27 | 28 | def createLock(self): 29 | self.lock = None 30 | 31 | 32 | logger = logging.getLogger(__name__) 33 | logger.addHandler(NullHandler()) 34 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/distro/__init__.py: -------------------------------------------------------------------------------- 1 | from .distro import ( 2 | NORMALIZED_DISTRO_ID, 3 | NORMALIZED_LSB_ID, 4 | NORMALIZED_OS_ID, 5 | LinuxDistribution, 6 | __version__, 7 | build_number, 8 | codename, 9 | distro_release_attr, 10 | distro_release_info, 11 | id, 12 | info, 13 | like, 14 | linux_distribution, 15 | lsb_release_attr, 16 | lsb_release_info, 17 | major_version, 18 | minor_version, 19 | name, 20 | os_release_attr, 21 | os_release_info, 22 | uname_attr, 23 | uname_info, 24 | version, 25 | version_parts, 26 | ) 27 | 28 | __all__ = [ 29 | "NORMALIZED_DISTRO_ID", 30 | "NORMALIZED_LSB_ID", 31 | "NORMALIZED_OS_ID", 32 | "LinuxDistribution", 33 | "build_number", 34 | "codename", 35 | "distro_release_attr", 36 | "distro_release_info", 37 | "id", 38 | "info", 39 | "like", 40 | "linux_distribution", 41 | "lsb_release_attr", 42 | "lsb_release_info", 43 | "major_version", 44 | "minor_version", 45 | "name", 46 | "os_release_attr", 47 | "os_release_info", 48 | "uname_attr", 49 | "uname_info", 50 | "version", 51 | "version_parts", 52 | ] 53 | 54 | __version__ = __version__ 55 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/distro/__main__.py: -------------------------------------------------------------------------------- 1 | from .distro import main 2 | 3 | if __name__ == "__main__": 4 | main() 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/idna/__init__.py: -------------------------------------------------------------------------------- 1 | from .package_data import __version__ 2 | from .core import ( 3 | IDNABidiError, 4 | IDNAError, 5 | InvalidCodepoint, 6 | InvalidCodepointContext, 7 | alabel, 8 | check_bidi, 9 | check_hyphen_ok, 10 | check_initial_combiner, 11 | check_label, 12 | check_nfc, 13 | decode, 14 | encode, 15 | ulabel, 16 | uts46_remap, 17 | valid_contextj, 18 | valid_contexto, 19 | valid_label_length, 20 | valid_string_length, 21 | ) 22 | from .intranges import intranges_contain 23 | 24 | __all__ = [ 25 | "IDNABidiError", 26 | "IDNAError", 27 | "InvalidCodepoint", 28 | "InvalidCodepointContext", 29 | "alabel", 30 | "check_bidi", 31 | "check_hyphen_ok", 32 | "check_initial_combiner", 33 | "check_label", 34 | "check_nfc", 35 | "decode", 36 | "encode", 37 | "intranges_contain", 38 | "ulabel", 39 | "uts46_remap", 40 | "valid_contextj", 41 | "valid_contexto", 42 | "valid_label_length", 43 | "valid_string_length", 44 | ] 45 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/idna/compat.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | from .codec import * 3 | from typing import Any, Union 4 | 5 | def ToASCII(label: str) -> bytes: 6 | return encode(label) 7 | 8 | def ToUnicode(label: Union[bytes, bytearray]) -> str: 9 | return decode(label) 10 | 11 | def nameprep(s: Any) -> None: 12 | raise NotImplementedError('IDNA 2008 does not utilise nameprep protocol') 13 | 14 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/idna/package_data.py: -------------------------------------------------------------------------------- 1 | __version__ = '3.4' 2 | 3 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/msgpack/__init__.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | from .exceptions import * 3 | from .ext import ExtType, Timestamp 4 | 5 | import os 6 | import sys 7 | 8 | 9 | version = (1, 0, 5) 10 | __version__ = "1.0.5" 11 | 12 | 13 | if os.environ.get("MSGPACK_PUREPYTHON") or sys.version_info[0] == 2: 14 | from .fallback import Packer, unpackb, Unpacker 15 | else: 16 | try: 17 | from ._cmsgpack import Packer, unpackb, Unpacker 18 | except ImportError: 19 | from .fallback import Packer, unpackb, Unpacker 20 | 21 | 22 | def pack(o, stream, **kwargs): 23 | """ 24 | Pack object `o` and write it to `stream` 25 | 26 | See :class:`Packer` for options. 27 | """ 28 | packer = Packer(**kwargs) 29 | stream.write(packer.pack(o)) 30 | 31 | 32 | def packb(o, **kwargs): 33 | """ 34 | Pack object `o` and return packed bytes 35 | 36 | See :class:`Packer` for options. 37 | """ 38 | return Packer(**kwargs).pack(o) 39 | 40 | 41 | def unpack(stream, **kwargs): 42 | """ 43 | Unpack an object from `stream`. 44 | 45 | Raises `ExtraData` when `stream` contains extra bytes. 46 | See :class:`Unpacker` for options. 47 | """ 48 | data = stream.read() 49 | return unpackb(data, **kwargs) 50 | 51 | 52 | # alias for compatibility to simplejson/marshal/pickle. 53 | load = unpack 54 | loads = unpackb 55 | 56 | dump = pack 57 | dumps = packb 58 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/msgpack/exceptions.py: -------------------------------------------------------------------------------- 1 | class UnpackException(Exception): 2 | """Base class for some exceptions raised while unpacking. 3 | 4 | NOTE: unpack may raise exception other than subclass of 5 | UnpackException. If you want to catch all error, catch 6 | Exception instead. 7 | """ 8 | 9 | 10 | class BufferFull(UnpackException): 11 | pass 12 | 13 | 14 | class OutOfData(UnpackException): 15 | pass 16 | 17 | 18 | class FormatError(ValueError, UnpackException): 19 | """Invalid msgpack format""" 20 | 21 | 22 | class StackError(ValueError, UnpackException): 23 | """Too nested""" 24 | 25 | 26 | # Deprecated. Use ValueError instead 27 | UnpackValueError = ValueError 28 | 29 | 30 | class ExtraData(UnpackValueError): 31 | """ExtraData is raised when there is trailing data. 32 | 33 | This exception is raised while only one-shot (not streaming) 34 | unpack. 35 | """ 36 | 37 | def __init__(self, unpacked, extra): 38 | self.unpacked = unpacked 39 | self.extra = extra 40 | 41 | def __str__(self): 42 | return "unpack(b) received extra data." 43 | 44 | 45 | # Deprecated. Use Exception instead to catch all exception during packing. 46 | PackException = Exception 47 | PackValueError = ValueError 48 | PackOverflowError = OverflowError 49 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/packaging/__about__.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | 5 | __all__ = [ 6 | "__title__", 7 | "__summary__", 8 | "__uri__", 9 | "__version__", 10 | "__author__", 11 | "__email__", 12 | "__license__", 13 | "__copyright__", 14 | ] 15 | 16 | __title__ = "packaging" 17 | __summary__ = "Core utilities for Python packages" 18 | __uri__ = "https://github.com/pypa/packaging" 19 | 20 | __version__ = "21.3" 21 | 22 | __author__ = "Donald Stufft and individual contributors" 23 | __email__ = "donald@stufft.io" 24 | 25 | __license__ = "BSD-2-Clause or Apache-2.0" 26 | __copyright__ = "2014-2019 %s" % __author__ 27 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/packaging/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | 5 | from .__about__ import ( 6 | __author__, 7 | __copyright__, 8 | __email__, 9 | __license__, 10 | __summary__, 11 | __title__, 12 | __uri__, 13 | __version__, 14 | ) 15 | 16 | __all__ = [ 17 | "__title__", 18 | "__summary__", 19 | "__uri__", 20 | "__version__", 21 | "__author__", 22 | "__email__", 23 | "__license__", 24 | "__copyright__", 25 | ] 26 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/version.py: -------------------------------------------------------------------------------- 1 | # file generated by setuptools_scm 2 | # don't change, don't track in version control 3 | __version__ = version = '3.8.1' 4 | __version_tuple__ = version_tuple = (3, 8, 1) 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/pygments/__main__.py: -------------------------------------------------------------------------------- 1 | """ 2 | pygments.__main__ 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | Main entry point for ``python -m pygments``. 6 | 7 | :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | """ 10 | 11 | import sys 12 | from pip._vendor.pygments.cmdline import main 13 | 14 | try: 15 | sys.exit(main(sys.argv)) 16 | except KeyboardInterrupt: 17 | sys.exit(1) 18 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/pygments/modeline.py: -------------------------------------------------------------------------------- 1 | """ 2 | pygments.modeline 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | A simple modeline parser (based on pymodeline). 6 | 7 | :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | """ 10 | 11 | import re 12 | 13 | __all__ = ['get_filetype_from_buffer'] 14 | 15 | 16 | modeline_re = re.compile(r''' 17 | (?: vi | vim | ex ) (?: [<=>]? \d* )? : 18 | .* (?: ft | filetype | syn | syntax ) = ( [^:\s]+ ) 19 | ''', re.VERBOSE) 20 | 21 | 22 | def get_filetype_from_line(l): 23 | m = modeline_re.search(l) 24 | if m: 25 | return m.group(1) 26 | 27 | 28 | def get_filetype_from_buffer(buf, max_lines=5): 29 | """ 30 | Scan the buffer for modelines and return filetype if one is found. 31 | """ 32 | lines = buf.splitlines() 33 | for l in lines[-1:-max_lines-1:-1]: 34 | ret = get_filetype_from_line(l) 35 | if ret: 36 | return ret 37 | for i in range(max_lines, -1, -1): 38 | if i < len(lines): 39 | ret = get_filetype_from_line(lines[i]) 40 | if ret: 41 | return ret 42 | 43 | return None 44 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/__init__.py: -------------------------------------------------------------------------------- 1 | """Wrappers to call pyproject.toml-based build backend hooks. 2 | """ 3 | 4 | from ._impl import ( 5 | BackendInvalid, 6 | BackendUnavailable, 7 | BuildBackendHookCaller, 8 | HookMissing, 9 | UnsupportedOperation, 10 | default_subprocess_runner, 11 | quiet_subprocess_runner, 12 | ) 13 | 14 | __version__ = '1.0.0' 15 | __all__ = [ 16 | 'BackendUnavailable', 17 | 'BackendInvalid', 18 | 'HookMissing', 19 | 'UnsupportedOperation', 20 | 'default_subprocess_runner', 21 | 'quiet_subprocess_runner', 22 | 'BuildBackendHookCaller', 23 | ] 24 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_compat.py: -------------------------------------------------------------------------------- 1 | __all__ = ("tomllib",) 2 | 3 | import sys 4 | 5 | if sys.version_info >= (3, 11): 6 | import tomllib 7 | else: 8 | from pip._vendor import tomli as tomllib 9 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py: -------------------------------------------------------------------------------- 1 | """This is a subpackage because the directory is on sys.path for _in_process.py 2 | 3 | The subpackage should stay as empty as possible to avoid shadowing modules that 4 | the backend might import. 5 | """ 6 | 7 | import importlib.resources as resources 8 | 9 | try: 10 | resources.files 11 | except AttributeError: 12 | # Python 3.8 compatibility 13 | def _in_proc_script_path(): 14 | return resources.path(__package__, '_in_process.py') 15 | else: 16 | def _in_proc_script_path(): 17 | return resources.as_file( 18 | resources.files(__package__).joinpath('_in_process.py')) 19 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/requests/__version__.py: -------------------------------------------------------------------------------- 1 | # .-. .-. .-. . . .-. .-. .-. .-. 2 | # |( |- |.| | | |- `-. | `-. 3 | # ' ' `-' `-`.`-' `-' `-' ' `-' 4 | 5 | __title__ = "requests" 6 | __description__ = "Python HTTP for Humans." 7 | __url__ = "https://requests.readthedocs.io" 8 | __version__ = "2.31.0" 9 | __build__ = 0x023100 10 | __author__ = "Kenneth Reitz" 11 | __author_email__ = "me@kennethreitz.org" 12 | __license__ = "Apache 2.0" 13 | __copyright__ = "Copyright Kenneth Reitz" 14 | __cake__ = "\u2728 \U0001f370 \u2728" 15 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ 4 | requests.certs 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module returns the preferred default CA certificate bundle. There is 8 | only one — the one from the certifi package. 9 | 10 | If you are packaging Requests, e.g., for a Linux distribution or a managed 11 | environment, you can change the definition of where() to return a separately 12 | packaged CA bundle. 13 | """ 14 | 15 | import os 16 | 17 | if "_PIP_STANDALONE_CERT" not in os.environ: 18 | from pip._vendor.certifi import where 19 | else: 20 | def where(): 21 | return os.environ["_PIP_STANDALONE_CERT"] 22 | 23 | if __name__ == "__main__": 24 | print(where()) 25 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/requests/hooks.py: -------------------------------------------------------------------------------- 1 | """ 2 | requests.hooks 3 | ~~~~~~~~~~~~~~ 4 | 5 | This module provides the capabilities for the Requests hooks system. 6 | 7 | Available hooks: 8 | 9 | ``response``: 10 | The response generated from a Request. 11 | """ 12 | HOOKS = ["response"] 13 | 14 | 15 | def default_hooks(): 16 | return {event: [] for event in HOOKS} 17 | 18 | 19 | # TODO: response is the only one 20 | 21 | 22 | def dispatch_hook(key, hooks, hook_data, **kwargs): 23 | """Dispatches a hook dictionary on a given piece of data.""" 24 | hooks = hooks or {} 25 | hooks = hooks.get(key) 26 | if hooks: 27 | if hasattr(hooks, "__call__"): 28 | hooks = [hooks] 29 | for hook in hooks: 30 | _hook_data = hook(hook_data, **kwargs) 31 | if _hook_data is not None: 32 | hook_data = _hook_data 33 | return hook_data 34 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/requests/packages.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | # This code exists for backwards compatibility reasons. 4 | # I don't like it either. Just look the other way. :) 5 | 6 | for package in ('urllib3', 'idna', 'chardet'): 7 | vendored_package = "pip._vendor." + package 8 | locals()[package] = __import__(vendored_package) 9 | # This traversal is apparently necessary such that the identities are 10 | # preserved (requests.packages.urllib3.* is urllib3.*) 11 | for mod in list(sys.modules): 12 | if mod == vendored_package or mod.startswith(vendored_package + '.'): 13 | unprefixed_mod = mod[len("pip._vendor."):] 14 | sys.modules['pip._vendor.requests.packages.' + unprefixed_mod] = sys.modules[mod] 15 | 16 | # Kinda cool, though, right? 17 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = [ 2 | "__version__", 3 | "AbstractProvider", 4 | "AbstractResolver", 5 | "BaseReporter", 6 | "InconsistentCandidate", 7 | "Resolver", 8 | "RequirementsConflicted", 9 | "ResolutionError", 10 | "ResolutionImpossible", 11 | "ResolutionTooDeep", 12 | ] 13 | 14 | __version__ = "1.0.1" 15 | 16 | 17 | from .providers import AbstractProvider, AbstractResolver 18 | from .reporters import BaseReporter 19 | from .resolvers import ( 20 | InconsistentCandidate, 21 | RequirementsConflicted, 22 | ResolutionError, 23 | ResolutionImpossible, 24 | ResolutionTooDeep, 25 | Resolver, 26 | ) 27 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/collections_abc.py: -------------------------------------------------------------------------------- 1 | __all__ = ["Mapping", "Sequence"] 2 | 3 | try: 4 | from collections.abc import Mapping, Sequence 5 | except ImportError: 6 | from collections import Mapping, Sequence 7 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/_emoji_replace.py: -------------------------------------------------------------------------------- 1 | from typing import Callable, Match, Optional 2 | import re 3 | 4 | from ._emoji_codes import EMOJI 5 | 6 | 7 | _ReStringMatch = Match[str] # regex match object 8 | _ReSubCallable = Callable[[_ReStringMatch], str] # Callable invoked by re.sub 9 | _EmojiSubMethod = Callable[[_ReSubCallable, str], str] # Sub method of a compiled re 10 | 11 | 12 | def _emoji_replace( 13 | text: str, 14 | default_variant: Optional[str] = None, 15 | _emoji_sub: _EmojiSubMethod = re.compile(r"(:(\S*?)(?:(?:\-)(emoji|text))?:)").sub, 16 | ) -> str: 17 | """Replace emoji code in text.""" 18 | get_emoji = EMOJI.__getitem__ 19 | variants = {"text": "\uFE0E", "emoji": "\uFE0F"} 20 | get_variant = variants.get 21 | default_variant_code = variants.get(default_variant, "") if default_variant else "" 22 | 23 | def do_replace(match: Match[str]) -> str: 24 | emoji_code, emoji_name, variant = match.groups() 25 | try: 26 | return get_emoji(emoji_name.lower()) + get_variant( 27 | variant, default_variant_code 28 | ) 29 | except KeyError: 30 | return emoji_code 31 | 32 | return _emoji_sub(do_replace, text) 33 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/_extension.py: -------------------------------------------------------------------------------- 1 | from typing import Any 2 | 3 | 4 | def load_ipython_extension(ip: Any) -> None: # pragma: no cover 5 | # prevent circular import 6 | from pip._vendor.rich.pretty import install 7 | from pip._vendor.rich.traceback import install as tr_install 8 | 9 | install() 10 | tr_install() 11 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/_fileno.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from typing import IO, Callable 4 | 5 | 6 | def get_fileno(file_like: IO[str]) -> int | None: 7 | """Get fileno() from a file, accounting for poorly implemented file-like objects. 8 | 9 | Args: 10 | file_like (IO): A file-like object. 11 | 12 | Returns: 13 | int | None: The result of fileno if available, or None if operation failed. 14 | """ 15 | fileno: Callable[[], int] | None = getattr(file_like, "fileno", None) 16 | if fileno is not None: 17 | try: 18 | return fileno() 19 | except Exception: 20 | # `fileno` is documented as potentially raising a OSError 21 | # Alas, from the issues, there are so many poorly implemented file-like objects, 22 | # that `fileno()` can raise just about anything. 23 | return None 24 | return None 25 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/_loop.py: -------------------------------------------------------------------------------- 1 | from typing import Iterable, Tuple, TypeVar 2 | 3 | T = TypeVar("T") 4 | 5 | 6 | def loop_first(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: 7 | """Iterate and generate a tuple with a flag for first value.""" 8 | iter_values = iter(values) 9 | try: 10 | value = next(iter_values) 11 | except StopIteration: 12 | return 13 | yield True, value 14 | for value in iter_values: 15 | yield False, value 16 | 17 | 18 | def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: 19 | """Iterate and generate a tuple with a flag for last value.""" 20 | iter_values = iter(values) 21 | try: 22 | previous_value = next(iter_values) 23 | except StopIteration: 24 | return 25 | for value in iter_values: 26 | yield False, previous_value 27 | previous_value = value 28 | yield True, previous_value 29 | 30 | 31 | def loop_first_last(values: Iterable[T]) -> Iterable[Tuple[bool, bool, T]]: 32 | """Iterate and generate a tuple with a flag for first and last value.""" 33 | iter_values = iter(values) 34 | try: 35 | previous_value = next(iter_values) 36 | except StopIteration: 37 | return 38 | first = True 39 | for value in iter_values: 40 | yield first, False, previous_value 41 | first = False 42 | previous_value = value 43 | yield first, True, previous_value 44 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/_pick.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | 4 | def pick_bool(*values: Optional[bool]) -> bool: 5 | """Pick the first non-none bool or return the last value. 6 | 7 | Args: 8 | *values (bool): Any number of boolean or None values. 9 | 10 | Returns: 11 | bool: First non-none boolean. 12 | """ 13 | assert values, "1 or more values required" 14 | for value in values: 15 | if value is not None: 16 | return value 17 | return bool(value) 18 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/_stack.py: -------------------------------------------------------------------------------- 1 | from typing import List, TypeVar 2 | 3 | T = TypeVar("T") 4 | 5 | 6 | class Stack(List[T]): 7 | """A small shim over builtin list.""" 8 | 9 | @property 10 | def top(self) -> T: 11 | """Get top of stack.""" 12 | return self[-1] 13 | 14 | def push(self, item: T) -> None: 15 | """Push an item on to the stack (append in stack nomenclature).""" 16 | self.append(item) 17 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/_timer.py: -------------------------------------------------------------------------------- 1 | """ 2 | Timer context manager, only used in debug. 3 | 4 | """ 5 | 6 | from time import time 7 | 8 | import contextlib 9 | from typing import Generator 10 | 11 | 12 | @contextlib.contextmanager 13 | def timer(subject: str = "time") -> Generator[None, None, None]: 14 | """print the elapsed time. (only used in debugging)""" 15 | start = time() 16 | yield 17 | elapsed = time() - start 18 | elapsed_ms = elapsed * 1000 19 | print(f"{subject} elapsed {elapsed_ms:.1f}ms") 20 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/abc.py: -------------------------------------------------------------------------------- 1 | from abc import ABC 2 | 3 | 4 | class RichRenderable(ABC): 5 | """An abstract base class for Rich renderables. 6 | 7 | Note that there is no need to extend this class, the intended use is to check if an 8 | object supports the Rich renderable protocol. For example:: 9 | 10 | if isinstance(my_object, RichRenderable): 11 | console.print(my_object) 12 | 13 | """ 14 | 15 | @classmethod 16 | def __subclasshook__(cls, other: type) -> bool: 17 | """Check if this class supports the rich render protocol.""" 18 | return hasattr(other, "__rich_console__") or hasattr(other, "__rich__") 19 | 20 | 21 | if __name__ == "__main__": # pragma: no cover 22 | from pip._vendor.rich.text import Text 23 | 24 | t = Text() 25 | print(isinstance(Text, RichRenderable)) 26 | print(isinstance(t, RichRenderable)) 27 | 28 | class Foo: 29 | pass 30 | 31 | f = Foo() 32 | print(isinstance(f, RichRenderable)) 33 | print(isinstance("", RichRenderable)) 34 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/color_triplet.py: -------------------------------------------------------------------------------- 1 | from typing import NamedTuple, Tuple 2 | 3 | 4 | class ColorTriplet(NamedTuple): 5 | """The red, green, and blue components of a color.""" 6 | 7 | red: int 8 | """Red component in 0 to 255 range.""" 9 | green: int 10 | """Green component in 0 to 255 range.""" 11 | blue: int 12 | """Blue component in 0 to 255 range.""" 13 | 14 | @property 15 | def hex(self) -> str: 16 | """get the color triplet in CSS style.""" 17 | red, green, blue = self 18 | return f"#{red:02x}{green:02x}{blue:02x}" 19 | 20 | @property 21 | def rgb(self) -> str: 22 | """The color in RGB format. 23 | 24 | Returns: 25 | str: An rgb color, e.g. ``"rgb(100,23,255)"``. 26 | """ 27 | red, green, blue = self 28 | return f"rgb({red},{green},{blue})" 29 | 30 | @property 31 | def normalized(self) -> Tuple[float, float, float]: 32 | """Convert components into floats between 0 and 1. 33 | 34 | Returns: 35 | Tuple[float, float, float]: A tuple of three normalized colour components. 36 | """ 37 | red, green, blue = self 38 | return red / 255.0, green / 255.0, blue / 255.0 39 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/constrain.py: -------------------------------------------------------------------------------- 1 | from typing import Optional, TYPE_CHECKING 2 | 3 | from .jupyter import JupyterMixin 4 | from .measure import Measurement 5 | 6 | if TYPE_CHECKING: 7 | from .console import Console, ConsoleOptions, RenderableType, RenderResult 8 | 9 | 10 | class Constrain(JupyterMixin): 11 | """Constrain the width of a renderable to a given number of characters. 12 | 13 | Args: 14 | renderable (RenderableType): A renderable object. 15 | width (int, optional): The maximum width (in characters) to render. Defaults to 80. 16 | """ 17 | 18 | def __init__(self, renderable: "RenderableType", width: Optional[int] = 80) -> None: 19 | self.renderable = renderable 20 | self.width = width 21 | 22 | def __rich_console__( 23 | self, console: "Console", options: "ConsoleOptions" 24 | ) -> "RenderResult": 25 | if self.width is None: 26 | yield self.renderable 27 | else: 28 | child_options = options.update_width(min(self.width, options.max_width)) 29 | yield from console.render(self.renderable, child_options) 30 | 31 | def __rich_measure__( 32 | self, console: "Console", options: "ConsoleOptions" 33 | ) -> "Measurement": 34 | if self.width is not None: 35 | options = options.update_width(self.width) 36 | measurement = Measurement.get(console, options, self.renderable) 37 | return measurement 38 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/diagnose.py: -------------------------------------------------------------------------------- 1 | import os 2 | import platform 3 | 4 | from pip._vendor.rich import inspect 5 | from pip._vendor.rich.console import Console, get_windows_console_features 6 | from pip._vendor.rich.panel import Panel 7 | from pip._vendor.rich.pretty import Pretty 8 | 9 | 10 | def report() -> None: # pragma: no cover 11 | """Print a report to the terminal with debugging information""" 12 | console = Console() 13 | inspect(console) 14 | features = get_windows_console_features() 15 | inspect(features) 16 | 17 | env_names = ( 18 | "TERM", 19 | "COLORTERM", 20 | "CLICOLOR", 21 | "NO_COLOR", 22 | "TERM_PROGRAM", 23 | "COLUMNS", 24 | "LINES", 25 | "JUPYTER_COLUMNS", 26 | "JUPYTER_LINES", 27 | "JPY_PARENT_PID", 28 | "VSCODE_VERBOSE_LOGGING", 29 | ) 30 | env = {name: os.getenv(name) for name in env_names} 31 | console.print(Panel.fit((Pretty(env)), title="[b]Environment Variables")) 32 | 33 | console.print(f'platform="{platform.system()}"') 34 | 35 | 36 | if __name__ == "__main__": # pragma: no cover 37 | report() 38 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/errors.py: -------------------------------------------------------------------------------- 1 | class ConsoleError(Exception): 2 | """An error in console operation.""" 3 | 4 | 5 | class StyleError(Exception): 6 | """An error in styles.""" 7 | 8 | 9 | class StyleSyntaxError(ConsoleError): 10 | """Style was badly formatted.""" 11 | 12 | 13 | class MissingStyle(StyleError): 14 | """No such style.""" 15 | 16 | 17 | class StyleStackError(ConsoleError): 18 | """Style stack is invalid.""" 19 | 20 | 21 | class NotRenderableError(ConsoleError): 22 | """Object is not renderable.""" 23 | 24 | 25 | class MarkupError(ConsoleError): 26 | """Markup was badly formatted.""" 27 | 28 | 29 | class LiveError(ConsoleError): 30 | """Error related to Live display.""" 31 | 32 | 33 | class NoAltScreen(ConsoleError): 34 | """Alt screen mode was required.""" 35 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/pager.py: -------------------------------------------------------------------------------- 1 | from abc import ABC, abstractmethod 2 | from typing import Any 3 | 4 | 5 | class Pager(ABC): 6 | """Base class for a pager.""" 7 | 8 | @abstractmethod 9 | def show(self, content: str) -> None: 10 | """Show content in pager. 11 | 12 | Args: 13 | content (str): Content to be displayed. 14 | """ 15 | 16 | 17 | class SystemPager(Pager): 18 | """Uses the pager installed on the system.""" 19 | 20 | def _pager(self, content: str) -> Any: #  pragma: no cover 21 | return __import__("pydoc").pager(content) 22 | 23 | def show(self, content: str) -> None: 24 | """Use the same pager used by pydoc.""" 25 | self._pager(content) 26 | 27 | 28 | if __name__ == "__main__": # pragma: no cover 29 | from .__main__ import make_test_card 30 | from .console import Console 31 | 32 | console = Console() 33 | with console.pager(styles=True): 34 | console.print(make_test_card()) 35 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/protocol.py: -------------------------------------------------------------------------------- 1 | from typing import Any, cast, Set, TYPE_CHECKING 2 | from inspect import isclass 3 | 4 | if TYPE_CHECKING: 5 | from pip._vendor.rich.console import RenderableType 6 | 7 | _GIBBERISH = """aihwerij235234ljsdnp34ksodfipwoe234234jlskjdf""" 8 | 9 | 10 | def is_renderable(check_object: Any) -> bool: 11 | """Check if an object may be rendered by Rich.""" 12 | return ( 13 | isinstance(check_object, str) 14 | or hasattr(check_object, "__rich__") 15 | or hasattr(check_object, "__rich_console__") 16 | ) 17 | 18 | 19 | def rich_cast(renderable: object) -> "RenderableType": 20 | """Cast an object to a renderable by calling __rich__ if present. 21 | 22 | Args: 23 | renderable (object): A potentially renderable object 24 | 25 | Returns: 26 | object: The result of recursively calling __rich__. 27 | """ 28 | from pip._vendor.rich.console import RenderableType 29 | 30 | rich_visited_set: Set[type] = set() # Prevent potential infinite loop 31 | while hasattr(renderable, "__rich__") and not isclass(renderable): 32 | # Detect object which claim to have all the attributes 33 | if hasattr(renderable, _GIBBERISH): 34 | return repr(renderable) 35 | cast_method = getattr(renderable, "__rich__") 36 | renderable = cast_method() 37 | renderable_type = type(renderable) 38 | if renderable_type in rich_visited_set: 39 | break 40 | rich_visited_set.add(renderable_type) 41 | 42 | return cast(RenderableType, renderable) 43 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/region.py: -------------------------------------------------------------------------------- 1 | from typing import NamedTuple 2 | 3 | 4 | class Region(NamedTuple): 5 | """Defines a rectangular region of the screen.""" 6 | 7 | x: int 8 | y: int 9 | width: int 10 | height: int 11 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/styled.py: -------------------------------------------------------------------------------- 1 | from typing import TYPE_CHECKING 2 | 3 | from .measure import Measurement 4 | from .segment import Segment 5 | from .style import StyleType 6 | 7 | if TYPE_CHECKING: 8 | from .console import Console, ConsoleOptions, RenderResult, RenderableType 9 | 10 | 11 | class Styled: 12 | """Apply a style to a renderable. 13 | 14 | Args: 15 | renderable (RenderableType): Any renderable. 16 | style (StyleType): A style to apply across the entire renderable. 17 | """ 18 | 19 | def __init__(self, renderable: "RenderableType", style: "StyleType") -> None: 20 | self.renderable = renderable 21 | self.style = style 22 | 23 | def __rich_console__( 24 | self, console: "Console", options: "ConsoleOptions" 25 | ) -> "RenderResult": 26 | style = console.get_style(self.style) 27 | rendered_segments = console.render(self.renderable, options) 28 | segments = Segment.apply_style(rendered_segments, style) 29 | return segments 30 | 31 | def __rich_measure__( 32 | self, console: "Console", options: "ConsoleOptions" 33 | ) -> Measurement: 34 | return Measurement.get(console, options, self.renderable) 35 | 36 | 37 | if __name__ == "__main__": # pragma: no cover 38 | from pip._vendor.rich import print 39 | from pip._vendor.rich.panel import Panel 40 | 41 | panel = Styled(Panel("hello"), "on blue") 42 | print(panel) 43 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/rich/themes.py: -------------------------------------------------------------------------------- 1 | from .default_styles import DEFAULT_STYLES 2 | from .theme import Theme 3 | 4 | 5 | DEFAULT = Theme(DEFAULT_STYLES) 6 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/tenacity/nap.py: -------------------------------------------------------------------------------- 1 | # Copyright 2016 Étienne Bersac 2 | # Copyright 2016 Julien Danjou 3 | # Copyright 2016 Joshua Harlow 4 | # Copyright 2013-2014 Ray Holder 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | import time 19 | import typing 20 | 21 | if typing.TYPE_CHECKING: 22 | import threading 23 | 24 | 25 | def sleep(seconds: float) -> None: 26 | """ 27 | Sleep strategy that delays execution for a given number of seconds. 28 | 29 | This is the default strategy, and may be mocked out for unit testing. 30 | """ 31 | time.sleep(seconds) 32 | 33 | 34 | class sleep_using_event: 35 | """Sleep strategy that waits on an event to be set.""" 36 | 37 | def __init__(self, event: "threading.Event") -> None: 38 | self.event = event 39 | 40 | def __call__(self, timeout: typing.Optional[float]) -> None: 41 | # NOTE(harlowja): this may *not* actually wait for timeout 42 | # seconds if the event is set (ie this may eject out early). 43 | self.event.wait(timeout=timeout) 44 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/tomli/__init__.py: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: MIT 2 | # SPDX-FileCopyrightText: 2021 Taneli Hukkinen 3 | # Licensed to PSF under a Contributor Agreement. 4 | 5 | __all__ = ("loads", "load", "TOMLDecodeError") 6 | __version__ = "2.0.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT 7 | 8 | from ._parser import TOMLDecodeError, load, loads 9 | 10 | # Pretend this exception was created here. 11 | TOMLDecodeError.__module__ = __name__ 12 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/tomli/_types.py: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: MIT 2 | # SPDX-FileCopyrightText: 2021 Taneli Hukkinen 3 | # Licensed to PSF under a Contributor Agreement. 4 | 5 | from typing import Any, Callable, Tuple 6 | 7 | # Type annotations 8 | ParseFloat = Callable[[str], Any] 9 | Key = Tuple[str, ...] 10 | Pos = int 11 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/truststore/__init__.py: -------------------------------------------------------------------------------- 1 | """Verify certificates using native system trust stores""" 2 | 3 | import sys as _sys 4 | 5 | if _sys.version_info < (3, 10): 6 | raise ImportError("truststore requires Python 3.10 or later") 7 | 8 | from ._api import SSLContext, extract_from_ssl, inject_into_ssl # noqa: E402 9 | 10 | del _api, _sys # type: ignore[name-defined] # noqa: F821 11 | 12 | __all__ = ["SSLContext", "inject_into_ssl", "extract_from_ssl"] 13 | __version__ = "0.8.0" 14 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/truststore/_ssl_constants.py: -------------------------------------------------------------------------------- 1 | import ssl 2 | import sys 3 | import typing 4 | 5 | # Hold on to the original class so we can create it consistently 6 | # even if we inject our own SSLContext into the ssl module. 7 | _original_SSLContext = ssl.SSLContext 8 | _original_super_SSLContext = super(_original_SSLContext, _original_SSLContext) 9 | 10 | # CPython is known to be good, but non-CPython implementations 11 | # may implement SSLContext differently so to be safe we don't 12 | # subclass the SSLContext. 13 | 14 | # This is returned by truststore.SSLContext.__class__() 15 | _truststore_SSLContext_dunder_class: typing.Optional[type] 16 | 17 | # This value is the superclass of truststore.SSLContext. 18 | _truststore_SSLContext_super_class: type 19 | 20 | if sys.implementation.name == "cpython": 21 | _truststore_SSLContext_super_class = _original_SSLContext 22 | _truststore_SSLContext_dunder_class = None 23 | else: 24 | _truststore_SSLContext_super_class = object 25 | _truststore_SSLContext_dunder_class = _original_SSLContext 26 | 27 | 28 | def _set_ssl_context_verify_mode( 29 | ssl_context: ssl.SSLContext, verify_mode: ssl.VerifyMode 30 | ) -> None: 31 | _original_super_SSLContext.verify_mode.__set__(ssl_context, verify_mode) # type: ignore[attr-defined] 32 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/_version.py: -------------------------------------------------------------------------------- 1 | # This file is protected via CODEOWNERS 2 | __version__ = "1.26.17" 3 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module provides means to detect the App Engine environment. 3 | """ 4 | 5 | import os 6 | 7 | 8 | def is_appengine(): 9 | return is_local_appengine() or is_prod_appengine() 10 | 11 | 12 | def is_appengine_sandbox(): 13 | """Reports if the app is running in the first generation sandbox. 14 | 15 | The second generation runtimes are technically still in a sandbox, but it 16 | is much less restrictive, so generally you shouldn't need to check for it. 17 | see https://cloud.google.com/appengine/docs/standard/runtimes 18 | """ 19 | return is_appengine() and os.environ["APPENGINE_RUNTIME"] == "python27" 20 | 21 | 22 | def is_local_appengine(): 23 | return "APPENGINE_RUNTIME" in os.environ and os.environ.get( 24 | "SERVER_SOFTWARE", "" 25 | ).startswith("Development/") 26 | 27 | 28 | def is_prod_appengine(): 29 | return "APPENGINE_RUNTIME" in os.environ and os.environ.get( 30 | "SERVER_SOFTWARE", "" 31 | ).startswith("Google App Engine/") 32 | 33 | 34 | def is_prod_appengine_mvms(): 35 | """Deprecated.""" 36 | return False 37 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # For backwards compatibility, provide imports that used to be here. 4 | from .connection import is_connection_dropped 5 | from .request import SKIP_HEADER, SKIPPABLE_HEADERS, make_headers 6 | from .response import is_fp_closed 7 | from .retry import Retry 8 | from .ssl_ import ( 9 | ALPN_PROTOCOLS, 10 | HAS_SNI, 11 | IS_PYOPENSSL, 12 | IS_SECURETRANSPORT, 13 | PROTOCOL_TLS, 14 | SSLContext, 15 | assert_fingerprint, 16 | resolve_cert_reqs, 17 | resolve_ssl_version, 18 | ssl_wrap_socket, 19 | ) 20 | from .timeout import Timeout, current_time 21 | from .url import Url, get_host, parse_url, split_first 22 | from .wait import wait_for_read, wait_for_write 23 | 24 | __all__ = ( 25 | "HAS_SNI", 26 | "IS_PYOPENSSL", 27 | "IS_SECURETRANSPORT", 28 | "SSLContext", 29 | "PROTOCOL_TLS", 30 | "ALPN_PROTOCOLS", 31 | "Retry", 32 | "Timeout", 33 | "Url", 34 | "assert_fingerprint", 35 | "current_time", 36 | "is_connection_dropped", 37 | "is_fp_closed", 38 | "get_host", 39 | "parse_url", 40 | "make_headers", 41 | "resolve_cert_reqs", 42 | "resolve_ssl_version", 43 | "split_first", 44 | "ssl_wrap_socket", 45 | "wait_for_read", 46 | "wait_for_write", 47 | "SKIP_HEADER", 48 | "SKIPPABLE_HEADERS", 49 | ) 50 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/queue.py: -------------------------------------------------------------------------------- 1 | import collections 2 | 3 | from ..packages import six 4 | from ..packages.six.moves import queue 5 | 6 | if six.PY2: 7 | # Queue is imported for side effects on MS Windows. See issue #229. 8 | import Queue as _unused_module_Queue # noqa: F401 9 | 10 | 11 | class LifoQueue(queue.Queue): 12 | def _init(self, _): 13 | self.queue = collections.deque() 14 | 15 | def _qsize(self, len=len): 16 | return len(self.queue) 17 | 18 | def _put(self, item): 19 | self.queue.append(item) 20 | 21 | def _get(self): 22 | return self.queue.pop() 23 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/vendor.txt: -------------------------------------------------------------------------------- 1 | CacheControl==0.13.1 # Make sure to update the license in pyproject.toml for this. 2 | colorama==0.4.6 3 | distlib==0.3.8 4 | distro==1.8.0 5 | msgpack==1.0.5 6 | packaging==21.3 7 | platformdirs==3.8.1 8 | pyparsing==3.1.0 9 | pyproject-hooks==1.0.0 10 | requests==2.31.0 11 | certifi==2023.7.22 12 | chardet==5.1.0 13 | idna==3.4 14 | urllib3==1.26.17 15 | rich==13.4.2 16 | pygments==2.15.1 17 | typing_extensions==4.7.1 18 | resolvelib==1.0.1 19 | setuptools==68.0.0 20 | six==1.16.0 21 | tenacity==8.2.2 22 | tomli==2.0.1 23 | truststore==0.8.0 24 | webencodings==0.5.1 25 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/_vendor/webencodings/mklabels.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | webencodings.mklabels 4 | ~~~~~~~~~~~~~~~~~~~~~ 5 | 6 | Regenarate the webencodings.labels module. 7 | 8 | :copyright: Copyright 2012 by Simon Sapin 9 | :license: BSD, see LICENSE for details. 10 | 11 | """ 12 | 13 | import json 14 | try: 15 | from urllib import urlopen 16 | except ImportError: 17 | from urllib.request import urlopen 18 | 19 | 20 | def assert_lower(string): 21 | assert string == string.lower() 22 | return string 23 | 24 | 25 | def generate(url): 26 | parts = ['''\ 27 | """ 28 | 29 | webencodings.labels 30 | ~~~~~~~~~~~~~~~~~~~ 31 | 32 | Map encoding labels to their name. 33 | 34 | :copyright: Copyright 2012 by Simon Sapin 35 | :license: BSD, see LICENSE for details. 36 | 37 | """ 38 | 39 | # XXX Do not edit! 40 | # This file is automatically generated by mklabels.py 41 | 42 | LABELS = { 43 | '''] 44 | labels = [ 45 | (repr(assert_lower(label)).lstrip('u'), 46 | repr(encoding['name']).lstrip('u')) 47 | for category in json.loads(urlopen(url).read().decode('ascii')) 48 | for encoding in category['encodings'] 49 | for label in encoding['labels']] 50 | max_len = max(len(label) for label, name in labels) 51 | parts.extend( 52 | ' %s:%s %s,\n' % (label, ' ' * (max_len - len(label)), name) 53 | for label, name in labels) 54 | parts.append('}') 55 | return ''.join(parts) 56 | 57 | 58 | if __name__ == '__main__': 59 | print(generate('http://encoding.spec.whatwg.org/encodings.json')) 60 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/pip/py.typed: -------------------------------------------------------------------------------- 1 | pip is a command line program. While it is implemented in Python, and so is 2 | available for import, you must not use pip's internal APIs in this way. Typing 3 | information is provided as a convenience only and is not a guarantee. Expect 4 | unannounced changes to the API and types in releases. 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2/_psycopg.cpython-312-x86_64-linux-gnu.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2/_psycopg.cpython-312-x86_64-linux-gnu.so -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2/errors.py: -------------------------------------------------------------------------------- 1 | """Error classes for PostgreSQL error codes 2 | """ 3 | 4 | # psycopg/errors.py - SQLSTATE and DB-API exceptions 5 | # 6 | # Copyright (C) 2018-2019 Daniele Varrazzo 7 | # Copyright (C) 2020-2021 The Psycopg Team 8 | # 9 | # psycopg2 is free software: you can redistribute it and/or modify it 10 | # under the terms of the GNU Lesser General Public License as published 11 | # by the Free Software Foundation, either version 3 of the License, or 12 | # (at your option) any later version. 13 | # 14 | # In addition, as a special exception, the copyright holders give 15 | # permission to link this program with the OpenSSL library (or with 16 | # modified versions of OpenSSL that use the same license as OpenSSL), 17 | # and distribute linked combinations including the two. 18 | # 19 | # You must obey the GNU Lesser General Public License in all respects for 20 | # all of the code used other than OpenSSL. 21 | # 22 | # psycopg2 is distributed in the hope that it will be useful, but WITHOUT 23 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 24 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 25 | # License for more details. 26 | 27 | # 28 | # NOTE: the exceptions are injected into this module by the C extention. 29 | # 30 | 31 | 32 | def lookup(code): 33 | """Lookup an error code and return its exception class. 34 | 35 | Raise `!KeyError` if the code is not found. 36 | """ 37 | from psycopg2._psycopg import sqlstate_errors # avoid circular import 38 | return sqlstate_errors[code] 39 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary-2.9.10.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary-2.9.10.dist-info/REQUESTED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary-2.9.10.dist-info/REQUESTED -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary-2.9.10.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: setuptools (75.1.0) 3 | Root-Is-Purelib: false 4 | Tag: cp312-cp312-manylinux_2_17_x86_64 5 | Tag: cp312-cp312-manylinux2014_x86_64 6 | 7 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary-2.9.10.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | psycopg2 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libcom_err-2abe824b.so.2.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libcom_err-2abe824b.so.2.1 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libcrypto-ea28cefb.so.1.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libcrypto-ea28cefb.so.1.1 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libgssapi_krb5-497db0c6.so.2.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libgssapi_krb5-497db0c6.so.2.2 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libk5crypto-b1f99d5c.so.3.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libk5crypto-b1f99d5c.so.3.1 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libkeyutils-dfe70bd6.so.1.5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libkeyutils-dfe70bd6.so.1.5 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libkrb5-fcafa220.so.3.3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libkrb5-fcafa220.so.3.3 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libkrb5support-d0bcff84.so.0.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libkrb5support-d0bcff84.so.0.1 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/liblber-e0f57070.so.2.0.200: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/liblber-e0f57070.so.2.0.200 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libldap-c37ed727.so.2.0.200: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libldap-c37ed727.so.2.0.200 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libpcre-9513aab5.so.1.2.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libpcre-9513aab5.so.1.2.0 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libpq-e8a033dd.so.5.16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libpq-e8a033dd.so.5.16 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libsasl2-883649fd.so.3.0.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libsasl2-883649fd.so.3.0.0 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libselinux-0922c95c.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libselinux-0922c95c.so.1 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libssl-3e69114b.so.1.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/psycopg2_binary.libs/libssl-3e69114b.so.1.1 -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/toml-0.10.2.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/toml-0.10.2.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright 2013-2019 William Pearson 4 | Copyright 2015-2016 Julien Enselme 5 | Copyright 2016 Google Inc. 6 | Copyright 2017 Samuel Vasko 7 | Copyright 2017 Nate Prewitt 8 | Copyright 2017 Jack Evans 9 | Copyright 2019 Filippo Broggini 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining a copy 12 | of this software and associated documentation files (the "Software"), to deal 13 | in the Software without restriction, including without limitation the rights 14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | copies of the Software, and to permit persons to whom the Software is 16 | furnished to do so, subject to the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be included in 19 | all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | THE SOFTWARE. -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/toml-0.10.2.dist-info/RECORD: -------------------------------------------------------------------------------- 1 | toml-0.10.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 2 | toml-0.10.2.dist-info/LICENSE,sha256=LZKUgj32yJNXyL5JJ_znk2HWVh5e51MtWSbmOTmqpTY,1252 3 | toml-0.10.2.dist-info/METADATA,sha256=n_YkspvEihd_QXLIZZ50WVSFz3rZ_k7jQP-OU1WUpWY,7142 4 | toml-0.10.2.dist-info/RECORD,, 5 | toml-0.10.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 6 | toml-0.10.2.dist-info/WHEEL,sha256=ADKeyaGyKF5DwBNE0sRE5pvW-bSkFMJfBuhzZ3rceP4,110 7 | toml-0.10.2.dist-info/top_level.txt,sha256=2BO8ZRNnvJWgXyiQv66LBb_v87qBzcoUtEBefA75Ouk,5 8 | toml/__init__.py,sha256=Au3kqCwKD0cjbf4yJGOpUFwpsY0WHsC1ZRGvWgIKmpc,723 9 | toml/__pycache__/__init__.cpython-312.pyc,, 10 | toml/__pycache__/decoder.cpython-312.pyc,, 11 | toml/__pycache__/encoder.cpython-312.pyc,, 12 | toml/__pycache__/ordered.cpython-312.pyc,, 13 | toml/__pycache__/tz.cpython-312.pyc,, 14 | toml/decoder.py,sha256=hSGTLf-2WBDZ_ddoCHWFy6N647XyMSh1o3rN2o4dEFg,38942 15 | toml/encoder.py,sha256=XjBc8ayvvlsLyd_qDA4tMWDNmMFRS4DpwtuDSWBq7zo,9940 16 | toml/ordered.py,sha256=mz03lZmV0bmc9lsYRIUOuj7Dsu5Ptwq-UtGVq5FdVZ4,354 17 | toml/tz.py,sha256=-5vg8wkg_atnVi2TnEveexIVE7T_FxBVr_-2WVfO1oA,701 18 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/toml-0.10.2.dist-info/REQUESTED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/toml-0.10.2.dist-info/REQUESTED -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/toml-0.10.2.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.35.1) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/toml-0.10.2.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | toml 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/toml/__init__.py: -------------------------------------------------------------------------------- 1 | """Python module which parses and emits TOML. 2 | 3 | Released under the MIT license. 4 | """ 5 | 6 | from toml import encoder 7 | from toml import decoder 8 | 9 | __version__ = "0.10.2" 10 | _spec_ = "0.5.0" 11 | 12 | load = decoder.load 13 | loads = decoder.loads 14 | TomlDecoder = decoder.TomlDecoder 15 | TomlDecodeError = decoder.TomlDecodeError 16 | TomlPreserveCommentDecoder = decoder.TomlPreserveCommentDecoder 17 | 18 | dump = encoder.dump 19 | dumps = encoder.dumps 20 | TomlEncoder = encoder.TomlEncoder 21 | TomlArraySeparatorEncoder = encoder.TomlArraySeparatorEncoder 22 | TomlPreserveInlineDictEncoder = encoder.TomlPreserveInlineDictEncoder 23 | TomlNumpyEncoder = encoder.TomlNumpyEncoder 24 | TomlPreserveCommentEncoder = encoder.TomlPreserveCommentEncoder 25 | TomlPathlibEncoder = encoder.TomlPathlibEncoder 26 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/toml/ordered.py: -------------------------------------------------------------------------------- 1 | from collections import OrderedDict 2 | from toml import TomlEncoder 3 | from toml import TomlDecoder 4 | 5 | 6 | class TomlOrderedDecoder(TomlDecoder): 7 | 8 | def __init__(self): 9 | super(self.__class__, self).__init__(_dict=OrderedDict) 10 | 11 | 12 | class TomlOrderedEncoder(TomlEncoder): 13 | 14 | def __init__(self): 15 | super(self.__class__, self).__init__(_dict=OrderedDict) 16 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/toml/tz.py: -------------------------------------------------------------------------------- 1 | from datetime import tzinfo, timedelta 2 | 3 | 4 | class TomlTz(tzinfo): 5 | def __init__(self, toml_offset): 6 | if toml_offset == "Z": 7 | self._raw_offset = "+00:00" 8 | else: 9 | self._raw_offset = toml_offset 10 | self._sign = -1 if self._raw_offset[0] == '-' else 1 11 | self._hours = int(self._raw_offset[1:3]) 12 | self._minutes = int(self._raw_offset[4:6]) 13 | 14 | def __deepcopy__(self, memo): 15 | return self.__class__(self._raw_offset) 16 | 17 | def tzname(self, dt): 18 | return "UTC" + self._raw_offset 19 | 20 | def utcoffset(self, dt): 21 | return self._sign * timedelta(hours=self._hours, minutes=self._minutes) 22 | 23 | def dst(self, dt): 24 | return timedelta(0) 25 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/werkzeug-3.1.3.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/werkzeug-3.1.3.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: flit 3.10.1 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/werkzeug/__init__.py: -------------------------------------------------------------------------------- 1 | from .serving import run_simple as run_simple 2 | from .test import Client as Client 3 | from .wrappers import Request as Request 4 | from .wrappers import Response as Response 5 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/werkzeug/debug/shared/ICON_LICENSE.md: -------------------------------------------------------------------------------- 1 | Silk icon set 1.3 by Mark James 2 | 3 | http://www.famfamfam.com/lab/icons/silk/ 4 | 5 | License: [CC-BY-2.5](https://creativecommons.org/licenses/by/2.5/) 6 | or [CC-BY-3.0](https://creativecommons.org/licenses/by/3.0/) 7 | -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/werkzeug/debug/shared/console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/werkzeug/debug/shared/console.png -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/werkzeug/debug/shared/less.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/werkzeug/debug/shared/less.png -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/werkzeug/debug/shared/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/werkzeug/debug/shared/more.png -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/werkzeug/middleware/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/werkzeug/middleware/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/werkzeug/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/werkzeug/py.typed -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/werkzeug/sansio/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/.venv/lib/python3.12/site-packages/werkzeug/sansio/__init__.py -------------------------------------------------------------------------------- /restful_python/.venv/lib/python3.12/site-packages/werkzeug/wrappers/__init__.py: -------------------------------------------------------------------------------- 1 | from .request import Request as Request 2 | from .response import Response as Response 3 | from .response import ResponseStream as ResponseStream 4 | -------------------------------------------------------------------------------- /restful_python/.venv/lib64: -------------------------------------------------------------------------------- 1 | lib -------------------------------------------------------------------------------- /restful_python/.venv/pyvenv.cfg: -------------------------------------------------------------------------------- 1 | home = /usr/bin 2 | include-system-site-packages = false 3 | version = 3.12.3 4 | executable = /usr/bin/python3.12 5 | command = /usr/bin/python3 -m venv /home/cleuton/Documents/projetos/restful_python/.venv 6 | -------------------------------------------------------------------------------- /restful_python/README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/README.pdf -------------------------------------------------------------------------------- /restful_python/app.log: -------------------------------------------------------------------------------- 1 | 2025-01-06 11:37:18,972 - MinhaAplicacao - INFO - Pessoa inserida com ID: 3 2 | 2025-01-06 11:38:16,592 - MinhaAplicacao - INFO - Pessoa inserida com ID: 4 3 | 2025-01-06 11:40:03,679 - MinhaAplicacao - INFO - Pessoa inserida com ID: 5 4 | 2025-01-06 11:41:32,698 - MinhaAplicacao - INFO - Pessoa inserida com ID: 3 5 | 2025-01-06 11:43:38,023 - MinhaAplicacao - INFO - Pessoa inserida com ID: 3 6 | 2025-01-07 10:07:24,969 - MinhaAplicacao - INFO - Pessoa inserida com ID: 3 7 | 2025-01-07 10:15:15,595 - MinhaAplicacao - INFO - Pessoa inserida com ID: 4 8 | 2025-01-07 10:15:38,184 - MinhaAplicacao - INFO - Pessoa inserida com ID: 5 9 | 2025-01-07 10:16:02,428 - MinhaAplicacao - INFO - Pessoa inserida com ID: 6 10 | -------------------------------------------------------------------------------- /restful_python/database/init.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS pessoa ( 2 | id SERIAL PRIMARY KEY, 3 | nome VARCHAR(100) NOT NULL 4 | ); 5 | 6 | CREATE TABLE IF NOT EXISTS dependente ( 7 | id SERIAL PRIMARY KEY, 8 | nome VARCHAR(100) NOT NULL, 9 | nascimento DATE NOT NULL, 10 | parentesco VARCHAR(50) NOT NULL, 11 | id_pessoa INTEGER NOT NULL, 12 | CONSTRAINT fk_pessoa 13 | FOREIGN KEY(id_pessoa) 14 | REFERENCES pessoa(id) 15 | ON DELETE CASCADE 16 | ); 17 | 18 | insert into pessoa (nome) values ('João'); 19 | insert into pessoa (nome) values ('Maria'); 20 | insert into dependente (nome, nascimento, parentesco, id_pessoa) values ('Filho 1 de João', '2010-01-01', 'Filho', 1); 21 | insert into dependente (nome, nascimento, parentesco, id_pessoa) values ('Filho 2 de João', '2012-01-01', 'Filho', 1); 22 | insert into dependente (nome, nascimento, parentesco, id_pessoa) values ('Filho 1 de Maria', '2014-01-01', 'Filho', 2); 23 | insert into dependente (nome, nascimento, parentesco, id_pessoa) values ('Filho 2 de Maria', '2016-01-01', 'Filho', 2); 24 | -------------------------------------------------------------------------------- /restful_python/database/start_db.sh: -------------------------------------------------------------------------------- 1 | docker run -d \ 2 | --name meu_postgres \ 3 | -e POSTGRES_USER=postgres \ 4 | -e POSTGRES_PASSWORD=postgres \ 5 | -p 5432:5432 \ 6 | -v "$(pwd)/init.sql":/docker-entrypoint-initdb.d/init.sql \ 7 | postgres:latest -------------------------------------------------------------------------------- /restful_python/db/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/db/__init__.py -------------------------------------------------------------------------------- /restful_python/db/connection_pool.py: -------------------------------------------------------------------------------- 1 | # db/connection_pool.py 2 | 3 | import psycopg2 4 | from psycopg2 import pool 5 | import os 6 | 7 | # Exemplo de variáveis de ambiente 8 | DB_HOST = os.getenv('DB_HOST', 'localhost') 9 | DB_PORT = os.getenv('DB_PORT', '5432') 10 | DB_NAME = os.getenv('DB_NAME', 'postgres') 11 | DB_USER = os.getenv('DB_USER', 'postgres') 12 | DB_PASS = os.getenv('DB_PASS', 'postgres') 13 | 14 | class DatabasePool: 15 | __pool = None 16 | 17 | @staticmethod 18 | def initialize(minconn=1, maxconn=5): 19 | if DatabasePool.__pool is None: 20 | DatabasePool.__pool = psycopg2.pool.SimpleConnectionPool( 21 | minconn, 22 | maxconn, 23 | host=DB_HOST, 24 | port=DB_PORT, 25 | database=DB_NAME, 26 | user=DB_USER, 27 | password=DB_PASS 28 | ) 29 | 30 | @staticmethod 31 | def get_connection(): 32 | if DatabasePool.__pool is None: 33 | raise Exception("Pool de conexões não foi inicializado.") 34 | return DatabasePool.__pool.getconn() 35 | 36 | @staticmethod 37 | def release_connection(conn): 38 | if DatabasePool.__pool is None: 39 | raise Exception("Pool de conexões não foi inicializado.") 40 | DatabasePool.__pool.putconn(conn) 41 | 42 | @staticmethod 43 | def close_all(): 44 | if DatabasePool.__pool: 45 | DatabasePool.__pool.closeall() 46 | DatabasePool.__pool = None 47 | -------------------------------------------------------------------------------- /restful_python/db/models.py: -------------------------------------------------------------------------------- 1 | # db/models.py 2 | 3 | class Pessoa: 4 | def __init__(self, id=None, nome=None): 5 | self.id = id 6 | self.nome = nome 7 | self.dependentes = [] # lista de Dependentes 8 | 9 | class Dependente: 10 | def __init__(self, id=None, nome=None, nascimento=None, parentesco=None, id_pessoa=None): 11 | self.id = id 12 | self.nome = nome 13 | self.nascimento = nascimento 14 | self.parentesco = parentesco 15 | self.id_pessoa = id_pessoa 16 | -------------------------------------------------------------------------------- /restful_python/db/queries_script.py: -------------------------------------------------------------------------------- 1 | class Queries: 2 | def __init__(self): 3 | self.select_pessoas = "SELECT id, nome FROM pessoa" 4 | self.insert_pessoa = "INSERT INTO pessoa (nome) VALUES (%s) RETURNING id" 5 | self.update_pessoa = "UPDATE pessoa SET nome = %s WHERE id = %s" 6 | self.delete_pessoa = "DELETE FROM pessoa WHERE id = %s" 7 | self.select_pessoa = "SELECT id, nome FROM pessoa WHERE id = %s" 8 | self.select_pessoa_dependentes = """ 9 | SELECT id, nome, nascimento, parentesco, id_pessoa 10 | FROM dependente 11 | WHERE id_pessoa = %s 12 | """ 13 | self.insert_dependente = """ 14 | INSERT INTO dependente (nome, nascimento, parentesco, id_pessoa) 15 | VALUES (%s, %s, %s, %s) RETURNING id 16 | """ 17 | self.update_dependente = """ 18 | UPDATE dependente 19 | SET nome = %s, nascimento = %s, parentesco = %s 20 | WHERE id = %s 21 | """ 22 | self.delete_dependente = "DELETE FROM dependente WHERE id = %s" 23 | self.select_dependente_por_id = """ 24 | SELECT id, nome, nascimento, parentesco, id_pessoa 25 | FROM dependente 26 | WHERE id = %s 27 | """ 28 | queries = Queries() 29 | -------------------------------------------------------------------------------- /restful_python/logger_config.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | # Configuração Global do Logger 4 | def setup_logger(): 5 | logger = logging.getLogger("MinhaAplicacao") # Nome global para o logger 6 | logger.setLevel(logging.DEBUG) # Define o nível global de log 7 | 8 | # Handler para console 9 | console_handler = logging.StreamHandler() 10 | console_handler.setLevel(logging.INFO) 11 | 12 | # Handler para arquivo 13 | file_handler = logging.FileHandler("app.log") 14 | file_handler.setLevel(logging.DEBUG) 15 | 16 | # Formato dos logs 17 | formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') 18 | console_handler.setFormatter(formatter) 19 | file_handler.setFormatter(formatter) 20 | 21 | # Adicionando os handlers ao logger 22 | logger.addHandler(console_handler) 23 | logger.addHandler(file_handler) 24 | 25 | return logger 26 | 27 | 28 | # Configurando o logger global 29 | logger = setup_logger() 30 | -------------------------------------------------------------------------------- /restful_python/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/logo.png -------------------------------------------------------------------------------- /restful_python/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | psycopg2-binary 3 | gunicorn 4 | toml 5 | -------------------------------------------------------------------------------- /restful_python/server.py: -------------------------------------------------------------------------------- 1 | # server.py 2 | 3 | from web.app import create_app 4 | 5 | app = create_app() 6 | 7 | if __name__ == "__main__": 8 | app.run(debug=True) 9 | -------------------------------------------------------------------------------- /restful_python/services/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/services/__init__.py -------------------------------------------------------------------------------- /restful_python/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/tests/__init__.py -------------------------------------------------------------------------------- /restful_python/tests/api_tests.sh: -------------------------------------------------------------------------------- 1 | #!bash 2 | # Selecionar pessoa 3 | curl -X GET http://localhost:8000/pessoas/1 4 | 5 | # Selecionar todas as pessoas 6 | curl -X GET http://localhost:8000/pessoas 7 | 8 | # Inserir pessoa 9 | curl -X POST -H "Content-type: application/json" http://localhost:8000/pessoas -d '{"nome": "Fulano da Silva"}' 10 | 11 | # Buscar pessoa inserida 12 | curl -X GET http://localhost:8000/pessoas/3 13 | 14 | # Atualizar pessoa 15 | curl -X PUT -H "Content-type: application/json" http://localhost:8000/pessoas/3 -d '{"nome": "Fulano da Silva de Tal"}' 16 | 17 | # Ver se atualizou 18 | curl -X GET http://localhost:8000/pessoas/3 19 | 20 | # Adicionar dependente 21 | curl -X POST -H "Content-type: application/json" http://localhost:8000/pessoas/3/dependentes \ 22 | -d '{"nome": "Ciclano da Silva", "parentesco": "Filho", "nascimento": "2000-01-01"}' 23 | 24 | # Verificar se adicionou 25 | curl -X GET http://localhost:8000/pessoas/3/dependentes 26 | 27 | # Remover pessoa 28 | curl -X DELETE http://localhost:8000/pessoas/3 29 | 30 | # Verificar se removeu 31 | curl -X GET http://localhost:8000/pessoas/3 -------------------------------------------------------------------------------- /restful_python/tests/postman/dev.postman_environment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "817f3d9f-12d4-4e16-9093-550d6477ed2e", 3 | "name": "dev", 4 | "values": [ 5 | { 6 | "key": "server", 7 | "value": "localhost", 8 | "type": "default", 9 | "enabled": true 10 | }, 11 | { 12 | "key": "port", 13 | "value": "8000", 14 | "type": "default", 15 | "enabled": true 16 | } 17 | ], 18 | "_postman_variable_scope": "environment", 19 | "_postman_exported_at": "2025-01-07T13:24:50.050Z", 20 | "_postman_exported_using": "Postman/11.23.3" 21 | } -------------------------------------------------------------------------------- /restful_python/tests/test_integration.py: -------------------------------------------------------------------------------- 1 | # tests/test_integration.py 2 | 3 | import unittest 4 | from db.connection_pool import DatabasePool 5 | from services import pessoa_service 6 | 7 | class TestPessoaServiceIntegration(unittest.TestCase): 8 | 9 | @classmethod 10 | def setUpClass(cls): 11 | # Inicializa o pool de conexões 12 | DatabasePool.initialize(minconn=1, maxconn=5) 13 | 14 | def test_criar_e_obter_pessoa(self): 15 | nova_pessoa = pessoa_service.criar_pessoa('Teste Integracao') 16 | self.assertIsNotNone(nova_pessoa.id) 17 | 18 | pessoa_db = pessoa_service.obter_pessoa(nova_pessoa.id) 19 | self.assertIsNotNone(pessoa_db) 20 | self.assertEqual(pessoa_db.nome, 'Teste Integracao') 21 | 22 | @classmethod 23 | def tearDownClass(cls): 24 | # Fechar pool de conexões ao final (se desejado) 25 | DatabasePool.close_all() 26 | 27 | if __name__ == '__main__': 28 | unittest.main() 29 | -------------------------------------------------------------------------------- /restful_python/tests/test_services.py: -------------------------------------------------------------------------------- 1 | # tests/test_services.py 2 | 3 | import unittest 4 | from unittest.mock import patch, MagicMock 5 | from services import pessoa_service 6 | from db.models import Pessoa 7 | 8 | class TestPessoaService(unittest.TestCase): 9 | 10 | @patch('services.pessoa_service.dao') 11 | def test_criar_pessoa(self, mock_dao): 12 | # Configura o mock 13 | mock_dao.inserir_pessoa.return_value = Pessoa(id=1, nome='Fulano') 14 | 15 | pessoa = pessoa_service.criar_pessoa('Fulano') 16 | self.assertEqual(pessoa.id, 1) 17 | self.assertEqual(pessoa.nome, 'Fulano') 18 | 19 | @patch('services.pessoa_service.dao') 20 | def test_obter_pessoa_nao_encontrada(self, mock_dao): 21 | mock_dao.buscar_pessoa_por_id.return_value = None 22 | 23 | pessoa = pessoa_service.obter_pessoa(999) 24 | self.assertIsNone(pessoa) 25 | 26 | if __name__ == '__main__': 27 | unittest.main() 28 | -------------------------------------------------------------------------------- /restful_python/web/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/restful_python/web/__init__.py -------------------------------------------------------------------------------- /servindo_mongodb/dbstore.py: -------------------------------------------------------------------------------- 1 | from pymongo import MongoClient 2 | import datetime 3 | 4 | client = MongoClient(port=27017) 5 | db=client.temperaturas 6 | 7 | def storeTemp(latitude, longitude, dataMedicao, temperatura): 8 | reg = {"latitude" : latitude, 9 | "longitude": longitude, 10 | "data" : dataMedicao, 11 | "temperatura": temperatura} 12 | db.temp.insert_one(reg) 13 | 14 | def getTemps(dataHoje): 15 | dataOntem = dataHoje - datetime.timedelta(days=1) 16 | dataAmanha = dataHoje + datetime.timedelta(days=1) 17 | recs = db.temp.find({'data': {'$lt': dataAmanha, '$gt': dataOntem}}) 18 | return recs 19 | -------------------------------------------------------------------------------- /servindo_mongodb/server.py: -------------------------------------------------------------------------------- 1 | import os, sys 2 | from flask import Flask, request, json 3 | import dbstore 4 | from datetime import datetime 5 | from bson.json_util import dumps 6 | 7 | app = Flask(__name__) 8 | 9 | @app.route('/sensor', methods=['GET']) 10 | def getTemps(): 11 | status=200 12 | temps = dbstore.getTemps(datetime.now()) 13 | lista = [] 14 | for temp in temps: 15 | registro = {} 16 | registro['latitude'] = temp['latitude'] 17 | registro['longitude'] = temp['longitude'] 18 | registro['data'] = temp['data'].strftime("%Y-%m-%d %H:%M:%S") 19 | registro['temperatura'] = temp['temperatura'] 20 | lista.append(registro) 21 | response = app.response_class( 22 | response=dumps(lista), 23 | status=status, 24 | mimetype='application/json') 25 | return response 26 | 27 | @app.route('/sensor', methods=['POST']) 28 | def storeTemps(): 29 | content = request.json 30 | data = datetime.strptime(content['data'], '%Y-%m-%d %H:%M:%S') 31 | dbstore.storeTemp(content['latitude'],content['longitude'], 32 | data,content['temperatura']) 33 | return app.response_class( 34 | response="{'status':'ok'}", 35 | status=200, 36 | mimetype='application/json' 37 | ) 38 | 39 | app.run(host='0.0.0.0', port=8088) -------------------------------------------------------------------------------- /tagcloud/README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/tagcloud/README.pdf -------------------------------------------------------------------------------- /tagcloud/requirements.txt: -------------------------------------------------------------------------------- 1 | svgwrite -------------------------------------------------------------------------------- /tagcloud/tags.txt: -------------------------------------------------------------------------------- 1 | Systems analyst 2 | Software engineer 3 | Systems analyst 4 | Developer 5 | Devops engineer 6 | Systems analyst 7 | SRE 8 | Devops engineer 9 | SRE 10 | Techlead 11 | Devops engineer 12 | Devops engineer 13 | SRE 14 | Solutions Architect 15 | Developer 16 | Developer 17 | Techlead 18 | Developer 19 | Techlead 20 | Data engineer 21 | Techlead 22 | Data Analyst 23 | Data Scientist 24 | Platform engineer 25 | Machine Learning Engineer 26 | Software engineer 27 | Platform engineer 28 | Platform engineer 29 | Data engineer 30 | Data engineer 31 | -------------------------------------------------------------------------------- /virtual_environment/ds-env.yml: -------------------------------------------------------------------------------- 1 | name: datascience 2 | dependencies: 3 | - numpy 4 | - scipy 5 | - pandas 6 | - scikit-learn 7 | - scipy 8 | - jupyter 9 | - matplotlib 10 | - statsmodels 11 | - python=3.6 12 | - pip: 13 | - tensorflow 14 | - tensorflow-tensorboard 15 | -------------------------------------------------------------------------------- /virtual_environment/im1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleuton/pythondrops/2b1b4adb6d17cea1d7fe8fe51d0dbbd5652f0efa/virtual_environment/im1.png --------------------------------------------------------------------------------