Saravanan666/pypi-org huggingface dataset:
Package: pytidylib
`PyTidyLib`_ is a Python package that wraps the `HTML Tidy`_ library. Thisallows you, from Python code, to "fix" invalid (X)HTML markup. Some of thelibrary's many capabilities include:* Clean up unclosed tags and unescaped characters such as ampersands* Output HTML 4 or XHTML, strict or transitional, and add missing doctypes* Convert named entities to numeric entities, which can then be used in XMLdocuments without an HTML doctype.* Clean up HTML from programs such as Word (to an extent)* Indent the output, including proper (i.e. no) indenting for ``pre`` elements,which some (X)HTML indenting code overlooks.Changes=======* 0.3.2: Initialization bug fix* 0.3.1: find_library support while still allowing a list of library names* 0.3.0: Refactored to use Tidy and PersistentTidy classes while keeping thefunctional interface (which will lazily create a global Tidy() object) forbackward compatibility. You can now pass a list of library names and baseoptions when instantiating Tidy. The keep_doc argument is now deprecatedand does nothing; use PersistentTidy.* 0.2.4: Bugfix for a strange memory allocation corner case in Tidy.* 0.2.3: Python 3 support (2 + 3 cross compatible) with passing Tox tests.Small example of use====================The following code cleans up an invalid HTML document and sets an option::from tidylib import tidy_documentdocument, errors = tidy_document('''<p>f&otilde;o <img src="bar.jpg">''',options={'numeric-entities':1})print documentprint errorsDocs====Documentation is shipped with the source distribution and is available atthe `PyTidyLib`_ web page... _`HTML Tidy`: http://tidy.sourceforge.net/.. _`PyTidyLib`: http://countergram.com/open-source/pytidylib/
Package: pytidylib6
0.2.0: Works on Windows! See documentation for available DLL download
locations. Documentation rewritten and expanded.PyTidyLibis a Python package that wraps theHTML Tidylibrary. This
allows you, from Python code, to “fix” invalid (X)HTML markup. Some of the
library’s many capabilities include:Clean up unclosed tags and unescaped characters such as ampersandsOutput HTML 4 or XHTML, strict or transitional, and add missing doctypesConvert named entities to numeric entities, which can then be used in XML
documents without an HTML doctype.Clean up HTML from programs such as Word (to an extent)Indent the output, including proper (i.e. no) indenting forpreelements,
which some (X)HTML indenting code overlooks.Small example of useThe following code cleans up an invalid HTML document and sets an option:from tidylib import tidy_document
document, errors = tidy_document('''<p>f&otilde;o <img src="bar.jpg">''',
  options={'numeric-entities':1})
print document
print errorsDocsDocumentation is shipped with the source distribution and is available at
thePyTidyLibweb page.
Package: pyTigerDriver
pyTigerDriverInstallationinstall with pip:pipinstallpyTigerDriverUsageArchitecture:You can instatiate anyInterface [GSQL or REST]in thepyTigerDriverseperately.This flowchart illustrates the Classes:graph LR
A[pyTigerDriver as tgCl] -- Gsql --> B((Gsql_Client))
A -- Rest --> C((Rest_Client))
B --> D{TigerGraph Database}
C --> DSample Code :importpyTigerDriverastgtgCl=tg.Client(server_ip="127.0.0.1",username="tigergraph",password="tigergraph",version="3.0.5")print("======================== SIMPLE RESTPP Queries ==================================")print(tgCl.Rest.get("/echo"))# tgCl.Rest.post or tgCl.Rest.deleteprint("============================== SIMPLE LS ===========================================")print(tgCl.Gsql.execute("ls"))Code Linting And Unit TestingCode Linting :Linting using PEP8 Standardsuser@box:~$flake8--exclude=venv*--ignore=E501--statisticspyTigerDriver/pyDriver.pyRunning the tests :run unit tests using pytest :user@box:~$pytest-vCircleCi Work flow :create a folder named .circleci in the root of the repowithin that folder create a file calledconfig.ymlcontaining the folloing flow :version:2.1orbs:python:circleci/python@0.2.1jobs:build-and-test:executor:python/defaultsteps:# Step 1: obtain repo from GitHub-checkout# Step 2: create virtual env and install dependencies-run:name:install dependenciescommand:|python3 -m venv venv. venv/bin/activatepip install -r requirements.txt# Step 3: run linter and tests-run:name:run testscommand:|. venv/bin/activateflake8 --exclude=venv* --ignore=E501  --statistics pyTigerDriver/pyDriver.pypytest -vworkflows:main:jobs:-build-and-test
Package: pyTigerGraph
pyTigerGraphpyTigerGraph is a Python package for connecting to TigerGraph databases. Check out the documentationhere.QuickstartInstalling pyTigerGraphThis section walks you through installing pyTigerGraph on your machine.PrerequisitesPython 3+If you wish to use the GDS functionality, installtorchahead of time.InstallpyTigerGraphTo downloadpyTigerGraph, run the following command in the command line or use the appropriate tool of your development environment (anaconda, PyCharm, etc.).:pip3installpyTigerGraphInstallpyTigerGraph[gds]To utilize the Graph Data Science Functionality, there are a few options:To use the GDS functions withPyTorch Geometric, installtorchandPyTorch Geometricaccording to their instructions:Install TorchInstall PyTorch GeometricInstall pyTigerGraph with:pip3install'pyTigerGraph[gds]'To use the GDS functions withDGL, installtorchanddglaccording to their instructions:Install TorchInstall DGLInstall pyTigerGraph with:pip3install'pyTigerGraph[gds]'To use the GDS functions without needing to produce output in the format supported by PyTorch Geometric or DGL.
This makes the data loaders outputPandas dataframes:pip3install'pyTigerGraph[gds]'Once the package is installed, you can import it like any other Python package:importpyTigerGraphastgGetting Started with Core FunctionsThe video above is a good starting place for learning the core functions of pyTigerGraph.This Google Colab notebookis the companion notebook to the video.
Package: pyTigerGraphBeta
pyTigerGraphpyTigerGraph is a Python package for connecting to TigerGraph databases. Check out the extended docshereGetting StartedTo download pyTigerGraph, simply run:pip3 install pyTigerGraphOnce the package installs, you can import it and instantiate a connection to your database:importpyTigerGraphastgconn=tg.TigerGraphConnection(host="<hostname>",graphname="<graph_name>",username="<username>",password="<password>",apiToken="<api_token>")If your database is not using the standard ports (or they are mapped), you can use the following arguments to specify those:restppPort (default 9000):REST++ API portgsPort (default: 14240):GraphStudio portFor example, in case of using a local virtual machine with the ports mapped:conn=tg.TigerGraphConnection(host="localhost",restppPort=25900,gsPort=25240,graphname="MyGraph",username="tigergraph",password="tigergraph",apiToken="2aa016d747ede9gg6da3drslm98srfoj")For more details on establishing a connection, read theGetting Startedpage.DevelopmentFork or clone this repo. Check out a new branch.Set up the dev environment:For core functionsFor the GDS subpackage, install thegds_dev_env.ymlenvironment in the "conda" folder. If you don't haveconda, installminiforgefirst. (Don't useminicondaas  Anaconda repo has a restrictive license now.)Work on your branch. Once your work is done, send a pull request. Unit tests are required for the review.Example ProjectsConnecting to TigerGraph Database with pyTigerGraphPredicting IPOs using Graph Convolutional Neural NetworksUsing pyTigergraph With PlotlyTigerGraph to TensorflowMovie Prediction with Graph Convolutional Neural NetworksCreditspyTigerGraph was originally created by Parker Erickson, a Computer Science student at the University of Minnesota. Special thanks to contributors Jon Herke and Szilard Barany of TigerGraph. Readthisto learn more about how you can contribute.
Package: pytiingo
PytiingoPytiingo is a Python SDK written for the Tiingo Financial Markets API. Tiingo delivers performant access to data from financial markets such as equities, cyrptocurrencies, and forex. They also support queryable fundamentals and news data spanning 20+ years.Use Pytiingo to query Tiingo's REST endpoints and receive data in JSON or Pandas format. Pytiingo will support real time streaming of financial data in the coming future. This library requires a free API key, which can be retrieved by making a free account on theirwebsite. You can also look at all the available functionality in theirAPI Documentation.InstallInstall the latest package using pip:pipinstallpytiingoTo install from the source, clone the directory using:gitclonegit@github.com:philipk19238/pytiingo.gitNavigate to the project directory and run:python setup.py --installREST UsageDocumentation below interfaces with Tiingo's REST endpointsInitialize the ClientThe REST Client can be initialized as follows:frompytiingoimportRESTClientclient=RESTClient(token='YOUR_API_TOKEN')If you want your data in a Pandas format, use:frompytiingoimportRESTClientclient=RESTClient(token='YOUR_API_TOKEN',output_format='pandas')Sample API CallsEOD EquitiesfrompytiingoimportRESTClientclient=RESTClient(token='YOUR_API_TOKEN')price=client.eod.get_prices('GOOG')CryptocurrenciesfrompytiingoimportRESTClientclient=RESTClient(token='YOUR_API_TOKEN')prices=client.crypto.get_prices(tickers='BTCUSD',startDate='2019-01-02',resampleFreq='5min')ForexfrompytiingoimportRESTClientclient=RESTClient(token='YOUR_API_TOKEN')prices=client.forex.get_prices('AUDUSD')Real Time EquitiesfrompytiingoimportRESTClientclient=RESTClient(token='YOUR_API_TOKEN')prices=client.iex.get_prices('GOOG')FundamentalsfrompytiingoimportRESTClientclient=RESTClient(token='YOUR_API_TOKEN')metrics=client.fundamentals.get_daily_metrics('GOOG')NewsfrompytiingoimportRESTClientclient=RESTClient(token='YOUR_API_TOKEN')news=client.news.get_news(tickers=['AAPL','GOOG'],tags=['election','argentina'])ContributingAll contributors are welcome! Just make a pull request :)TODOS:Finish WebsocketClient for data streamingAdd Unit TestsIntegrate CI PipelineAdd Integration Tests
Package: pytika
PyTikaAn Apache Tika Server python client.InstallationYou can install the package simply from pypi:pip install pytikaUsageThis package is a python client for Apache Tika Server, so you'll need to have Tika Server running locally somehow.
I would recommend using the docker image as that's the simplest.docker run --name tika-server -it -d -p 9998:9998 apache/tika:2.7.0-fullAfter you have that running, you can use PyTika to interface with it.Metadata queriesfrompytika.apiimportTikaApitika=TikaApi()metadata=api.get_meta(file)""">>> metadata{'Content-Type': 'application/pdf',...}"""Text detection queriesFor text detection, Tika Server usually decides on the response type (typically xml/html is the default).
To force it to return plain text (Accept: text/plain header) you can set the following configuration:frompytika.apiimportTikaApifrompytika.configimportGetTextOptionsBuilderasopttika=TikaApi()withopen("yourfile.whatever","rb")asfile:text=api.get_text(file,opt.AsPlainText()).decode()Notice the awkward configuration - passing a function call as an option - this is coming from a nice Golang standard that makes calling complex APIs a little friendlier. Since we have a lot of options, instead of having each be an argument, we can define an "option class" with chainable functions. This allows the API to validate each separately, avoid having a massive list of arguments for get_text, as well as tidy up the API code. (For more info:Uptrace,Dave Cheney's post)For detection in HOCR format with bounding boxes:frompytika.apiimportTikaApifrompytika.configimportGetTextOptionsBuilderasopttika=TikaApi()withopen("yourfile.whatever","rb")asfile:text=api.get_text(file,opt.WithBoundingBoxes()).decode()There are many more configuration options that you can look into in the GetTextOptionsBuilder class, and more to come in the future.Contribution GuideIf you'd like to add some missing features that you can find in TikaServer or Tika, then you can contribute to this repo yourself!1- Clone the repositorygit clone "url from repo, either ssh or https"2- Create a branchcd pytika
git switch -c your-new-branch-name3- Make necessary changes and commit, and push to Githubgit add README.md
git commit -m "Updated README.md with new API changes"
git push -u origin your-new-branch-name4- Go to your repository and you'll see aCompare and pull requestbutton, click on that.5- Wait for us to review your PR, likely leave comments, and hopefully merge it in!
Package: pytiktok
pytiktokto install:pipinstallpytiktokExamplefrompytiktokimportTikvideoVideo=Tikvideo()k=Video.tiktok("https://www.tiktok.com/@shib_x/video/6986742592985648390?sender_device=mobile&sender_web_id=7002607198221338117&is_from_webapp=v1&is_copy_url=0",True)print(k["ok"])print(k["link"])casesIf true, the link will open automaticallyIf flase, the link will not open automaticallyFollow us on social media accountstelegram : @DIBIBl ; @TDTDIinstgram : @_v_gogithub :https://github.com/muntazir-halim
Package: pytikz
Pytikz: generate pgf/tikz files with pythonThe purpose of this package is to facilitate the generation of pgf/tikz figures from within a python environment.
The objective of this package is to provide a unified pipeline for projecting geometrical shapes in any vector space onto the two-dimensional canvas.
Vectors and maps between vector spaces are at the core of this package; this package is much more than simply a collection of python wrappers for pgf/tikz commands.To get started, have a look at theexamplesor at thesource code.While it is possible to draw graphs using geometrical shapes and text nodes, this is still a cumbersome operation.
Classes for facilitating graph generation may be added in a future version of this package.
Package: pytiled-parser
pytiled-parserPyTiled Parser is a Python Library for parsingTiled Map Editormaps and tilesets to be used as maps and levels for 2D top-down (orthogonal, hexogonal, or isometric) or side-scrolling games in a strictly typed fashion.PyTiled Parser is not tied to any particular graphics library or game engine. It parses map files and returns arbitrary Python types(likePathobjects for image files rather than aSpritefrom any particular engine). This means it can be used to aide in implementing Tiled support into a wide variety of tools.Documentation available at:https://pytiled-parser.readthedocs.io/GitHub project at:https://github.com/pythonarcade/pytiled_parserPyPi:https://pypi.org/project/pytiled-parser/TheArcadelibrary hassupporting codeto
integrate PyTiled Parser andexample codeshowing its use.InstallationSimply install with pip:pip install pytiled-parserLoading a MapNOTE:All map paths should ideally bePathobjects from Python'spathlibmodule. However a string will work in many cases.frompathlibimportPathimportpytiled_parsermap_file=Path("assets/maps/my_map.tmx")my_map=pytiled_parser.parse_map(map_file)In order to fully understand the pytiled-parser API, it is suggested that you have a solid understanding of theTiled Map Editor, and it'sJSON format. An effort was made to keep the API that pytiled-parser provides as close as possible with the JSON format directly. Only small variations are made at certain points for ease of use with integrating to a game or engine.Working With LayersLayers are loaded as an ordered list ofLayerobjects within the map. They can be accessed via thelayersattribute of a map. There has been debate about wether or not these should be loaded in as a Dictionary, with the keys being the name of the layer. The decision was ultimately made to leave them as a list, as there is no guarantee, and beyond that is considered acceptable use to have duplicate layer names in Tiled.Thus the decision to allow duplicate layer names is up to the implementation, as an example,Arcadedoes not allow duplicate layer names, as it re-roganizes layers into dictionaries based on the name.DevelopmentTo develop pytiled parser, clone the repo, create avenvusing a supported Python version, and activate it. Then install the package as well as all testing, linting, and formatting dependencies with the commandpython -m pip install -e ".[dev]".Linting and Formattingflake8, mypy, black, and isort should all be used during development. These should ideally all pass before committing. Some work is under way to have a pre-commit hook for these or do checks in CI.TestingRunpytest --cov=pytiled_parserto run the test harness and report coverage.DocsInstall Docs dependencies with the commandpython -m pip install ".[docs]"To serve the docs locally:mkdocs serveThey can then be accessed onhttp://localhost:8000CreditsOriginal module created byBenjamin Kirkbride.Currently maintained byCleptomaniaSpecial thanks for contributions frompvcravenand the contributors that create Tiled, without which this library wouldn't exist.
Package: pytileproj
A python class for working with TiledProjectionSystems (TPS).It’s a python package that handles the geometric and geographic operations of a gridded and tiled projection system.
It was designed for data cubes ingesting satellite imagery and builds the basis for the Equi7Grid (seehttps://github.com/TUW-GEO/Equi7Grid).It also includes a nice and handy realisation of the UTM/UPS grid system, using the TiledProjectionSystems (TPS) approach.CitationIf you use the software in a publication then please cite it using the Zenodo DOI.
Be aware that this badge links to the latest package version.Please select your specific version athttps://doi.org/10.5281/zenodo.1042555to get the DOI of that version.
You should normally always use the DOI for the specific version of your record in citations.
This is to ensure that other researchers can access the exact research artefact you used for reproducibility.You can find additional information regarding DOI versioning athttp://help.zenodo.org/#versioningInstallationThis package should be installable through pip:pip install pytileprojInstalls for scipy and gdal are required from conda or conda-forge.ContributeWe are happy if you want to contribute. Please raise an issue explaining what
is missing or if you find a bug. We will also gladly accept pull requests
against our master branch for new features or bug fixes.Development setupFor Development we recommend acondaenvironment.Example installation scriptThe following script will install miniconda and setup the environment on a UNIX
like system. Miniconda will be installed into$HOME/miniconda.wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda create -n pytileproj_env python=3.6 numpy scipy pip gdal pyproj shapely
source activate pytileproj_envThis script adds$HOME/miniconda/bintemporarily to thePATHto do this
permanently addexportPATH="$HOME/miniconda/bin:$PATH"to your.bashrcor.zshrcThe last line in the example activates thepytileproj_envenvironment.After that you should be able to run:python setup.py testto run the test suite.GuidelinesIf you want to contribute please follow these steps:Fork the pytileproj repository to your accountClone the repositorymake a new feature branch from the pytileproj master branchAdd your featurePlease include tests for your contributions in one of the test directories.
We use py.test so a simple function called test_my_feature is enoughsubmit a pull request to our master branchNoteThis project has been set up using PyScaffold 3.3. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: pytill
======pytill======.. image:: https://img.shields.io/pypi/v/pytill.svg:target: https://pypi.python.org/pypi/pytill.. image:: https://img.shields.io/travis/manifoldco/pytill.svg:target: https://travis-ci.org/manifoldco/pytill.. image:: https://readthedocs.org/projects/pytill/badge/?version=latest:target: https://pytill.readthedocs.io/en/latest/?badge=latest:alt: Documentation StatusPython package for using Till Mobile brought to you by manifold.co* Free software: BSD license* Documentation: https://pytill.readthedocs.io.How to use--------Set up a plan for till and retrieve till username and api key. This packages expects the username and api key are injected as env vars ``USERNAME`` and ``API_KEY``.You can do this simply through manifold:.. code-block:: bashmanifold create -p till-project --product till --plan free # provision a free till resourcemanifold run -p till-project -- python # inject vars.. code-block:: pythonimport pytill # or from pytill import pytill# send a messagepytill.send_message(['19024880000'], 'I am sending a till message isnt that cool!')# ask a question# note that asking a question is how we open two-way communicate in Till# so this is also how you intiate listening to responses to a sms number with Tillquestion = pytill.make_question('How cool is Till mobile?', 'my-question', 'my.webhook/listens/here')pytill.send_question(['19024441111', '16139094888'], [question],  'my-project')# retrieve resultprint(pytill.get_results(question_tag='my-question'))# example output# {'meta': {'limit': 20, 'next': None, 'offset': 0, 'previous': None, 'total_count': 1}, 'objects': [{'created': '2018-08-27T19:07:35.423855', 'guid': '252cd98f-5969-44c9-a955-7bb54e6f0d19', 'origin_phone_number': '+16508668969', 'participant_guid': '883c8f57-74b9-43cb-bb72-c7634b97651a', 'participant_phone_number': '+19024000158', 'project_launch_guid': '80262aea-a77e-4a0c-911f-23b959aea6da', 'project_launch_participant_guid': '8a23ee27-4841-4f2b-83d5-2a59a05825b8', 'project_tag': 'my-project', 'question_display_order': '0', 'question_guid': '8c8c168f-87d5-454d-8bae-09781312c097', 'question_tag': 'my-question', 'question_text': 'How cool is Till mobile?', 'result_answer': 'really cool!', 'result_guid': '252cd98f-5969-44c9-a955-7bb54e6f0d19', 'result_response': 'really cool!', 'result_timestamp': '2018-08-27T19:07:35.423855', 'updated': '2018-08-27T19:07:35.423884'}]}# retrive stats about till usageprint(pytill.get_stats())=======History=======1.0.0 (2018-08-31)------------------* Release full package.0.1.0 (2018-08-27)------------------* First release on PyPI.