Saravanan666/pypi-org huggingface dataset:
Package: docstring-to-markdown
docstring-to-markdownOn the fly conversion of Python docstrings to markdownPython 3.6+ (tested on 3.7 up to 3.11)can recognise reStructuredText and convert multiple of its features to Markdownsince v0.13 includes initial support for Google-formatted docstringsInstallationpipinstalldocstring-to-markdownExampleConvert reStructuredText:>>>importdocstring_to_markdown>>>docstring_to_markdown.convert(':math:`\\sum`')'$\\sum$'When given the format cannot be recognised an exception will be raised:>>>docstring_to_markdown.convert('\\sum')Traceback(mostrecentcalllast):raiseUnknownFormatError()docstring_to_markdown.UnknownFormatErrorDevelopmentpipinstall-e.
pytest
Package: docstring-type-tag-checker
docstring_type_tag_checker - package to check the validity of docstrings typeThis package contains the 'BaseDocstringType' class that helps analyse a type docstring.
It is able to check if your type docstring format is correct and get the types used in the docstring.Basic UseYou simply have to import the class and pass the docstring to it :fromdocstring_type_tag_checkerimportBaseDocstringTypetype_string="dict[str, numpy.ndarray[int | float] | list[int | float]]"the_instance=BaseDocstringType.get_type_object(type_string)from this step, you can now check if the format is valid:the_instance.is_valid()>>>TrueYou can also get the string of the different types used in the docstring (primitve types are ignored)the_instance.get_type_strings()>>>{'numpy.ndarray'}You can also get a representation of the structure of the docstring with the str functionstr(the_instance)>>>GENERIC[dict]STRINGstrUNIONGENERIC[numpy.ndarray]UNIONSTRINGintSTRINGfloatGENERIC[list]UNIONSTRINGintSTRINGfloat
Package: docstring-utils
docstring-utilsSimple parser for Numpy, Sphinx, and Google-style docstrings📥 Installationpip install -U docstring-utilsRequirements:Python 3.7+🧑‍💻 UsageParse docstringfromdocstring_utilsimportparse_docstringdefexample(arg1:str,arg2:int)->int:"""Example of a Google-style docstring.Args:arg1 (str): Description of `arg1`.arg2 (int): Description of `arg2`.Returns:int: Description of `return` value."""return0result=parse_docstring(example,filter_args=True)print(result.description)# "Example of a Google-style docstring."args=result.args.values()print(args[0].name)# "arg1"print(args[0].description)# "Description of `arg1`."print(args[0].type)# "str"print(result.return_value.type)# "int"print(result.return_value.description)# "Description of `return` value."🧰 DevelopmentRunning testsInstalltoxwith the commandpip install -U toxRun tests with the commandtoxLintingRun the following command to lint with flake8python setup.py lint(Note: The exact command may vary depending on your Python version and environment)
Package: docstr-md
Docstring-Markdown is a fast and easy way to make beautiful documentation markdown files.Why Docstring-MarkdownIt's time to share your awesome new package with the world. And... get ready to spend the next week making your docs. Or, make beautiful docs with Docstring-Markdown in just a few lines of code.Installation$ pip install docstr-mdQuickstartFirst, clone a test file from the Docstring-Markdown repo.$curlhttps://raw.githubusercontent.com/dsbowen/docstr-md/master/test.py--outputtest.pyThe exampletest.pyuses sklearn formatted docstrings. Let's convert it to markdown.fromdocstr_md.pythonimportPySoup,compile_mdfromdocstr_md.src_hrefimportGithubsrc_href=Github('https://github.com/dsbowen/docstr-md/blob/master')soup=PySoup(path='test.py',parser='sklearn',src_href=src_href)compile_md(soup,compiler='sklearn',outfile='test.md')You'll now have atest.mdfile in your current directory.Thisis what it looks like rendered.Citation@software{bowen2020docstr-md,
  author = {Dillon Bowen},
  title = {Docstring-Markdown},
  url = {https://dsbowen.github.io/docstr-md/},
  date = {2020-05-15},
}LicenseUsers must cite Docstring-Markdown in any publications which use this software.Docstring-Markdown is licensed with the MITLicense.
Package: docstruct
DocstructOverviewDocstruct is a package that parses the results of optical character recognition (OCR) algorithms, such as Tesseract (using the hOCR output) or Textract (AWS), into a tree structure. This tree structure allows for the visual representation of the document, with each node representing a document, page, paragraph, line, word, or character, along with its bounding box. The package also includes support for paragraph detection and text splitting that preserves logical units.DocumentationFor more information read the docs at: [Docstruct](https://smrt-co.github.io/docstruct/)pip install docstructContributionsContributions to the Docstruct package are always welcome. If you have a bug fix or a new feature, feel free to create a pull request on the GitHub repository.LicenseThe Docstruct package is licensed under theMIT License.
Package: docsumo
Welcome to Docsumo python client documentation!Check us out athttps://www.docsumo.com/To find out about our web app or to get your API key, check outhttps://app.docsumo.com/Here is DocumentationPostman DocumentationInstallpip3installdocsumoSet API KEY from docsumo setting page as env variableDOCSUMO_API_KEYor pass apikey parameter in Docsumo class.exportDOCSUMO_API_KEY="test">>~/.bashrcsource~/.bashrcExamplefromdocsumoimportDocsumodoc=Docsumo()# OR# doc = Docsumo(apikey="fghhGh56HHJ...")# available methoddoc.user_detail_credit_limit()doc.documents_list()doc.documents_summary()doc.upload_file("./data/invoice.pdf","invoice",))doc.extracted_data("c511ba245484442fb")Output:# To get the user detail & credit limit.
print(doc.user_detail_credit_limit())

{'error': '',
 'error_code': '',
 'message': '',
 'status': 'success',
 'status_code': 200,
 'data': {'email': 'tester@docsumo.com',
          'full_name': 'Docsumo Tester',
          'monthly_doc_current': 75,
          'monthly_doc_limit': 300,
          'user_id': '5cb45f1f5a841101f703770a'}}
Package: docsvault
DocsVaultDocsVault is a python webapp that allow you to easily and reliably store importants documents in a ciphered vault.For more informations, take a look atfull documentation!InstallationDocsVault is availableon pypi.
You can install it using pip, or any pip-based tool likepipenv.pipinstalldocsvaultUsageLaunch application serverdocsvaultserverOpen web UI to interract with docsvault service.docsvaultwebuiNote: if server is not started,docsvault webuiwill run the server daemon automaticallyContributeRequirementsTo contribute, you must have installed the following toolsvue.js (version 2)python (version >= 3.6)pipenv (optional)Then simply runmakeinstallTo automatically install python and npm dev. dependencies.DevelopYou can start development server for backend by running
Idem for backendpipenvrunserveIdem for frontendnpmrunserve
Package: docsweeper
Docsweeperis a linter for version controlledPythoncode bases that finds
potentially outdated docstrings in your source files. For every code token in the file
that has a docstring (seePEP 257),Docsweeperwill interact with yourGitorMercurialversion control system to determine:in which revision the docstring has last been changed, andhow often the source code that is referenced by the docstring has been altered since
that revision.Used as a stand-alone application or as a plugin for theFlake8linter,Docsweepercan be integrated into your
code check-in or linting process easily and help you quickly determine which docstrings
potentially contain obsolete information.CompatibilityDocsweepersupports Linux, Mac, and Windows platforms that are compatible with Python
3.7 or newer. In addition to a working Python installation, you will also need at least
one of the version control systems you intend to useDocsweeperwith:Gitv1.7.0 or newer, and/orMercurialv5.2 or newer. This is the the first
release ofMercurialwithofficial supportforPython3.Refer to thedocumentationfor more information.
Package: doc-switch
DocSwitchDocSwitch gives you the freedom to write your Python documentation in any format you want, switching between them effortlessly.Free software: MIT licenseDocumentation:https://doc-switch.readthedocs.io.ChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog,
and this project adheres toSemantic Versioning.0.1.0 (2021-07-12)Added:Initial scaffoldDocumentationTestsCLI basics
Package: docsy
DocsyA docs site generator written with Python.InstallationInstall using Git or download manuallyGit:gitclonehttps://github.com/ginoblog/docsy.git(yoursitepath)Download manually:Download hereHow to useUse Python to run the programcdmy-site-path
pythonscripts/render.pyDevelopmentStill developingContributors@ginoblog
@sclass53
Package: doctable
doctablePython PackageSee thedoctable websitefor documentation and examples.Created byDevin J. Cornell.Doctable has a new interface!The package has been updated with an entirely new API to improve on previous limitations and better match theSqlalchemy 2.0interface. Inspired by theattrs project, I used different names for functions and classes to make it clear that the interface has changed and open the possibility for backwards compatibility with upgraded internals in the future.For now, stick to installing from thelegacybranch when using sqlalchemy <= 1.4, and themasterbranch for sqlalchemy >= 2.0.InstallationFromPython Package Index:pip install doctableFor sqlalchemy >= 2.0:pip install --upgrade git+https://github.com/devincornell/doctable.git@masterFor sqlalchemy <= 1.4:pip install --upgrade git+https://github.com/devincornell/doctable.git@legacyChanges in Version 2.0Create database connections usingConnectCoreobjects instead ofConnectEngineorDocTableobjects.Database tables represented byDBTableobjects instead ofDocTableobjects. AllDBTableinstances originate from aConnectCoreobject.Create schemas using thedoctable.table_schemadecorator instead of thedoctable.schemadecorator. This new decorator includes constraint and index parameters as well as those for thedataclassobjects.TheColumnfunction replacesColas generic default parameter values with more fine-grained control over column properties. This function provides a clearer separation between parameters that affect the behavior of the object as a dataclass (supplied as aFieldArgsobject) and those that affect the database column schema (supplied via aColumnArgsobject).New command line interface: you may execute doctable functions through the command line. Just usepython -m doctable execute {args here}to see how to use it.ExamplesSee theexamples/directory for more detailed examples.Basic stepsThese are the basic steps for usingdoctableto create a database connection, define a schema, and execute queries. For more examples, see thedoctable website.1. Create a database connection.core=doctable.ConnectCore.open(target=':memory:',# use a filename for a sqlite to write to diskdialect='sqlite',)2. Define a database schema from a dataclass.@doctable.table_schemaclassMyContainer:name:strage:intid:int=doctable.Column(column_args=doctable.ColumnArgs(order=0,primary_key=True,autoincrement=True),)3. Emit DDL to create a table from the schema.withcore.begin_ddl()asemitter:tab0=emitter.create_table(container_type=MyContainer)pprint.pprint(core.inspect_columns('MyContainer'))4. Execute queries on the table.withtab1.query()asq:q.insert_single(MyContainer(name='devin',age=40))print(q.select())>>MyContainer(name='devin',age=40,id=1)
Package: doctalk
doctalkPython-based summary and keyword extractor and question answering system with optional BERT-based post-processing filter and spoken output##INSTALL
See therequirements.txtfile if installing directly. To make an editable package locally, usepip3 install -e .To embed in a system as is, frompypi.orgusepip3 install -U doctalk##USAGE:python3 -i

>>> from doctalk.talk import run_with
>>> run_with(fname)
>>> from doctalk.think import reason_with
>>> reason_with(fname)This activates dialog about document in<fname>.txtwith questions in<fname>_quests.txtSee some examples at :https://github.com/ptarau/pytalk, where, after installing the system, you can runpython3 -i tests.py
>>> go()
>>> tgo()To run the system one will need to start theStanford Corenlp Server, listening on port9000with all annotators in params.py started, i.e., with something like:java -mx16g -cp "stanford-corenlp-full-2018-10-05/*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer 
-preload tokenize,ssplit,pos,lemma,depparse,natlog,openieTo play with various parameter settings, edit thedoctalk/params.pyfile.Please see the install hints forstanfordnlp, that might involve torch binaries, and require anaconda on some systems.Web AppTo use the included ``docbootWeb app, after installingFlask``` and ```waitress```, run the ```app.py``` file in directory ```docbot``` with ```python3 app.py```.The docbot uses a JSON-based API, documented indoctalk/api.py. In fact, this is the simplest way to integrate the summarizer and the dialog agent into a production system.
Package: doctestall
DoctestAllRecursive doctest-executing library and script for running doctest on projects.DoctestAll is a very simple solution for running unit tests a package at a time,
recursively descending with the__all__module property to find children
to analyze. Or audit, if you want a creepy scientology metaphor.DTA is available as thedoctestallmodule, and a script by the same name
which can be run from the command line.InstallationDTA can be installed via pip:sudo pip install doctestallOr by entering the following commands as administrator:git clone git://github.com/campadrenalin/DoctestAll.gitcd DoctestAllpython setup.py installOnce installed, you can import the doctestall module, or try it out in the shell:doctestall doctestallYes, this runs doctestallon itself.But to test some other module:doctestall cmathThe cmath module doesn’t use doctest, so the results are uninteresting, but on
the other hand, the recursive walk doesn’t make anything explode either. So you
might want to try it out on projects that are actually designed to use DTA, or
at least be friendly to it.Projects using or compatible with DTA:ConcurrenTreeDoctestAllEJTP
Package: doctest-cli
doctest-cliDoctests for your shell.
Run an executable, check the output.InstallationWithpip:pipinstalldoctest-cliBy hand:curl-Ohttps://github.com/ivan-krukov/doctest-cli/blob/master/bin/doctest-cli~/bin
chmod+x~/bin/doctest-cliUsageCreate a test script, saytest.sh:# Command>>>echohello# Expected outputhello# Another command>>>echo'Good bye!'Goodbye!# Failing>>>echobanana
appleTest it:doctest-clitest.shCheck output:doctest-cli: test/simple.sh
------------------------------------------------------------
Error while running:
  echo banana
With STDERR:

Expected STDOUT:
  apple
Got:
  banana
------------------------------------------------------------
Tests ran: 3
Tests passed: 2
Tests failed: 1DependenciesThe program depends onpython- both2.7and3.4and above should workExtraSeetest/for more examples.Return codeCheck return code by adding$?=<RET>to the beginning of the line. Default return code is0:>>>false$?=1>>>true$?=0Standard errorCheckstderroutput by adding!to the beginning of the line:>>>echoerror>/dev/stderr
!errorBy default, thestderrstream is assumed to be empty.Custom shellYou can use a custom shell with a shebang line:#!/usr/local/bin/fish>>>echohello;andechothis isfishhello
this isfishDetailsdoctest-cliusespython'ssubprocessmodule to spawn a new shell for each command and checks the output against the lines provided. All the environment variables are inherited from the parent session.Whitespace (including intervening newlines) is ignored. For example, the following test should pass, since all the newlines in the middle are removed:>>>printf'hello\n\n\n\n\n\nworld'hello
worldThis is done so that you can have an arbitrary amount of whitespace delineating the test blocks.
Package: doctestfn
doctestfnRun doctests for one Python function in a moduleInstallationThe program can be installed using pip:pip3 install doctestfnUsageusage: doctestfn [-h] [-v] module function

Run doctests for one function

positional arguments:
  module         Module to load
  function       Function to test

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  Enable verbose doctest output
Package: doctest-ignore-unicode
Overviewdoctest-ignore-unicode is a plugin (currently only forNose) that adds
a flag to ignore unicode literal prefixes in doctests.The implmentation is inspired byhttps://github.com/nltk/nltk/blob/2and3/nltk/test/doctest_nose_plugin.pyUsage>>> def hello_world():
...     return 'Hello World'
>>> hello_world()  # doctest: +IGNORE_UNICODE
u'Hello World'FAQWhy?If you need to ask you probably don’t need it.  (Hint: supporting python 2 & 3
in the same codebase).
Package: doctestpdbhacks
What does it do? Fixes line numbers so you can easily figure out where your doctest is failing, also fixesthe list command in pdb so it can properly list the source code for your doctest.Other things may be broken so please send feedback.add to your $HOME/.pdbrc:import doctestpdbhacksHere's an example of what it does:$ cat doctesttest.pydef foo(a):""">>> foo(1)2>>> import pdb; pdb.set_trace()>>> foo(2)2"""return a + 1def _test():import doctestdoctest.testmod()if __name__ == "__main__":_test()# without doctestpdbhacks$ python doctesttest.py> <doctest __main__.foo[1]>(1)?()->None-> import pdb; pdb.set_trace()(Pdb) l1  ->	import pdb; pdb.set_trace()[EOF]# Turn on doctestpdbhacks:$ echo >>$HOME/.pdbrc "import doctestpdbhacks"$ python doctesttest.py--Return--> doctest @ doctesttest.py(5)?()->None-> >>> import pdb; pdb.set_trace()(Pdb) l1  	def foo(a):2  	    """3  	    >>> foo(1)4  	    25  ->	    >>> import pdb; pdb.set_trace()6  	    >>> foo(2)7  	    28  	    """9  	    return a + 11011  	def _test():
Package: doctest-tools
These are a small set of tools to make it easier to run doctest on yoursource files and text files.There is a tool to run doctest on an individual file, and another tool
to run doctest on all files within a directory (recursively).  The
individual doctest runs are done in separate processes so that the
tests don’t contaminate each other.Finally, there is a small module to set the python path of the program
calling it to make it easier to run the program from multiple clones of
the same project where it is impossible to set the python path to a
single location.These tools are written in Python so that they will run on all
platforms.
Package: doctext
doctextExtract text from all kinds of documents.
Delegates the heavylifting to other libraries and tools likeApache Tika,tesseractand many more.Usage#!/usr/bin/env pythonfromdoctext.ProcessorimportProcessorimportlogging# set logging level to INFO to see what's going onlogging.basicConfig(level=logging.INFO)p=Processor()print(p.run('/Users/me/some.pptx'))# specify the language for tesseractp=Processor()print(p.run('/Users/me/some-german.png',tesseract_lang='deu'))# or with Whisper (see https://openai.com/pricing)p=Processor(openai_api_key='your-openai-api-key')print(p.run('/Users/me/some.m4a'))IntroductionWhy yet another library for extracting text from documents?
Becausetextractseems to be more or less abandoned and requires some outdated versions of dependencies. Also it does not support all the file formats I need.Apache Tikais great but surprisingly did not support some of the file formats I needed. So I decided to write a wrapper around awrapper.Installationpipinstalldoctextbrewinstallffmpegimagemagickpopplerlibheifdcraw
Package: doctl
python-doctlA Python wrapper for the excellentdoctlcommand-line utility, fromDigital Ocean.Usage>>> import doctl

>>> for droplet in doctl.compute.droplet.list():
...     print(droplet['name'])
pypi.kennethreitz.org
code.kennethreitz.org
build.kennethreitz.org
…

>>> for key in doctl.compute.ssh_key.list():
...     print(key['name'])
Blink (iPad)
thoth
macbookAll methods return Python data structures, includinging timezone–aware Datetime objects.NotesUse of theDIGITALOCEAN_ACCESS_TOKENenvironment variable is recommended.Available NamespacesThe entire API surface ofdoctlis covered by this library, so the following
namespaces are available for your use and enjoyment:compute.accountcompute.actioncompute.certificatecompute.domaincompute.domain_recordscompute.dropletcompute.firewallcompute.floating_ipcompute.imagecompute.image_actioncompute.load_balancercompute.plugincompute.region_listcompute.size_listcompute.snapshotcompute.ssh_keycompute.tagcompute.volumecompute.volume_actionInstallation$ pipenv install doctl✨🍰✨
Package: doctor
This module uses python types to validate request and response data in
Flask Python APIs.  It usespython 3 type hintsto validate request paramters and generate API documentation. It also supports
generic schema validation for plain dictionaries. An example of the generated
API documentation can
befound in the docs.Installdoctor can easily be installed using pip:$ pip install doctorQuick StartDefine some types that will be used to validate your request parameters.# mytypes.pyfromdoctorimporttypes# doctor provides helper functions to easily define simple types.FooId=types.integer('The foo ID.')FetchBars=types.boolean('A flag that indicates if we should fetch bars')# You can also inherit from type classes to create more complex types.classFoo(types.Object):description='A Foo object'example={'foo_id':1}properties={'foo_id':FooId}required=['foo_id']additional_properties=FalseDefine the logic function that our endpoint will route to:# foo.pyfrommytypesimportFoo,FooId,FetchBars# Note the type annotations on this function definition. This tells Doctor how# to parse and validate parameters for routes attached to this logic function.# The return type annotation will validate the response conforms to an# expected definition in development environments.  In non-development# environments a warning will be logged.defget_foo(foo_id:FooId,fetch_bars:FetchBars=False)->Foo:"""Fetches the Foo object and optionally related bars."""returnFoo.get_by_id(foo_id,fetch_bars=fetch_bars)Now tie the endpoint to the logic function with a route:fromflaskimportFlaskfromflask_restfulimportApifromdoctor.routingimportcreate_routes,get,Routefromfooimportget_fooroutes=(Route('/foo/<int:foo_id>/',methods=(get(get_foo),)),)app=Flask(__name__)api=Api(app)forroute,resourceincreate_routes(routes):api.add_resource(resource,route)That’s it, you now have a functioning API endpoint you can curl and the request is automatically validated for you based on your
schema.  Positional arguments in your logic function are considered required request parameters and keyword arguments are considered
optional.  As a bonus, using theautoflasksphinx directive, you will also get
automatically generated API documentation.DocumentationDocumentation and a full example is available atreadthedocs.Running TestsTests can be run withtox. It will handle installing dependencies into a
virtualenv, running tests, and rebuilding documentation.Then run Tox:cddoctortoxYou can pass arguments to pytest directly:tox--test/test_flask.py