Saravanan666/pypi-org huggingface dataset:
Package: pymssql
pymssql - DB-API interface to Microsoft SQL ServerA simple database interface forPythonthat builds on top ofFreeTDSto
provide a Python DB-API (PEP-249) interface toMicrosoft SQL Server.Detailed information on pymssql is available on the website:pymssql.readthedocs.ioNew development is happening on GitHub at:github.com/pymssql/pymssqlThere is a Google Group for discussion at:groups.google.comGetting startedpymssql wheels are available from PyPi. To install it run:pipinstall-UpippipinstallpymssqlMost of the times this should be all what’s needed.
The official pymssql wheels bundle a static copy of FreeTDS
and have SSL support so they can be used to connect to Azure.NoteOn some Linux distributionspipversion is too old to support all
the flavors of manylinux wheels, so upgradingpipis necessary.
An example of such distributions would be Ubuntu 18.04 or
Python3.6 module in RHEL8 and CentOS8.Basic exampleconn=pymssql.connect(server,user,password,"tempdb")cursor=conn.cursor(as_dict=True)cursor.execute('SELECT * FROM persons WHERE salesrep=%s','John Doe')forrowincursor:print("ID=%d, Name=%s"%(row['id'],row['name']))conn.close()Recent ChangesVersion 2.2.11 - 2023-12-03  - Mikhail TerekhovGeneralUse FreeTDS-1.4.9 for official wheels on PyPi.Add workflow for aarch64 wheel. Thanks to juntangc (fix #692, #759, #791, #819, #826, #858).Add datetime.date to SQLDATE conversion.Add encription parameter to connect (fix  #797).Bug fixesFix version parsing in development.Add missingcharsetparameter when formatting query (fix #650).Use four digits for the year in SP args binding (fix #454).Fix convert_python_value to work with datetime.date (fix #811).Version 2.2.10 - 2023-10-20  - Mikhail TerekhovGeneralPublish Linux wheels for Python-3.12
Package: py-ms-sql
Microsoft SQL Server Easy ConnectThe purpose of this small utility, one class module is to make connecting to a MS SQL Server easier. One problem I experienced through putting python code in production is: the operating system makes a difference. So if one has a error-free project running on their Windows machine and then deploy it on a unix based server, errors appear. This modul is OS independant (with one caveat, see below) so that regardless of where you the project is deployed, it will run without errors.Quick Start$ pip install py_ms_sqlUsagefrompy_ms_sqlimportpy_ms_sql# Set up connection object (OPTIONAL: pass a logger object)sql_conn=py_ms_sql.ConnectSQL()# Use one of the following (in order of ease-of-use)# DSN of ODBCstate,msg=sql_conn.connect(dsn='mysqldsn',uid='user',pwd='password')# OR# ODBC Driver Stringstate,msg=sql_conn.connect(driver_string="{SQL Server};SERVER=server_name;"\"DATABASE=my_db;UID=user;PWD=password")# OR# ODBC Driver Detailsstate,msg=sql_conn.connect(driver='{SQL Server}',server='server_name',db='my_db',uid='user',pwd='password')# OR# Specify ODBC Driver Locationstate,msg=sql_conn.connect(host="my-server.com",port=1433,db="my_db",uid='user',pwd=password,tds_version=7.3driver='/usr/local/lib/libtdsodbc.so')# Run a SELECT statement query (return error status and Pandas DataFrame)state,data=sql_conn.select(sql_query)# OR# Run an INSERT statement query (expects a table name and pandas DataFrame)state,msg=sql_conn.insert_df(df,table)# Close connectionstate,msg=sql_conn.close_conn()Run any one of the above commands and if the code can find the ODBC driver, it will connect.NOTE:The.query()method returns a Pandas DataFrameSelf DebugIn the event of errors try the following:Check, double check and check your connection details one more time.If you're connecting from something other than a Microsoft Machine, you may need to use the last option since some MS Sql Server use instance name to have a discoverable port number, and non-Microsoft machines struggle to discover port number (sometimes)If using FreeTDS on a non-Microsoft machine, make sure it is installed properlyTODOallow forwritingto MS SQL Server (if incomplete, only allows for read queries)improve ease of portability so that no effort (what-so-ever) is needed to accomodate operating systemallow for non-Pandas DataFrame returnsFine PrintThe main reason operating systems cause errors with connecting to MS SQL Server is due to the drivers and how a machine finds the drivers. For example, Windows can connect using an ODBC manager (so can MAC OSX, but not the easiest). Therefore, to make sure your deployment doesn't run with errors, useos.nameto determine which OS is running and call the correct driver/use the appropriate connection details.
Package: pymssql-jp100procent
pymssql - DB-API interface to Microsoft SQL ServerA simple database interface forPythonthat builds on top ofFreeTDSto
provide a Python DB-API (PEP-249) interface toMicrosoft SQL Server.Detailed information on pymssql is available on the website:pymssql.readthedocs.ioNew development is happening on GitHub at:github.com/pymssql/pymssqlThere is a Google Group for discussion at:groups.google.comGetting startedpymssql wheels are available from PyPi. To install it run:pipinstall-UpippipinstallpymssqlMost of the times this should be all what’s needed.
The official pymssql wheels bundle a static copy of FreeTDS
and have SSL support so they can be used to connect to Azure.NoteOn some Linux distributionspipversion is too old to support all
the flavors of manylinux wheels, so upgradingpipis necessary.
An example of such distributions would be Ubuntu 18.04 or
Python3.6 module in RHEL8 and CentOS8.Basic exampleconn=pymssql.connect(server,user,password,"tempdb")cursor=conn.cursor(as_dict=True)cursor.execute('SELECT * FROM persons WHERE salesrep=%s','John Doe')forrowincursor:print("ID=%d, Name=%s"%(row['id'],row['name']))conn.close()Recent ChangesVersion 2.2.7 - 2022-11-15  - Mikhail TerekhovGeneralBuild wheels for Python-3.6 (fix 787).Version 2.2.6 - 2022-11-12  - Mikhail TerekhovGeneralBuild wheels for Python-3.11.Use FreeTDS-1.3.13 for official wheels on PyPi.Fix build on Alpine Linux (fix #762).Fill in result description in cursor.callproc (fix #772).Add explicit link to krb5 (fix #776), thanks to James Coder.Some small doc fixes, thanks to guillaumep and Logan Elandt.
Package: pymstodo
pymstodo ✔️Python wrapper to deal withMicrosoft To Do.Installationpip3 install pymstodoRequirementspython >= 3.10requests_oauthlib >= 1.3.0UsageGet an API keybefore usingpymstodo.Use it to initialize client. Here is an example:frompymstodoimportToDoConnectionclient_id='PLACE YOUR CLIENT ID'client_secret='PLACE YOUR CLIENT SECRET'auth_url=ToDoConnection.get_auth_url(client_id)redirect_resp=input(f'Go here and authorize:\n{auth_url}\n\nPaste the full redirect URL below:\n')token=ToDoConnection.get_token(client_id,client_secret,redirect_resp)todo_client=ToDoConnection(client_id=client_id,client_secret=client_secret,token=token)lists=todo_client.get_lists()task_list=lists[0]tasks=todo_client.get_tasks(task_list.list_id)print(task_list)print(*tasks,sep='\n')Full documentation:https://inbalboa.github.io/pymstodo/API description by Microsoft see athttps://docs.microsoft.com/en-us/graph/api/resources/todo-overview
Package: pymsx
🧰  pymsx - Mosaics AI MSX Client for PythonThis repository contains the source code for Mosaics AI's official python client. This client is currently in pre-alpha version, so feedback is always welcome!You are welcome to file an issue here for general use cases. You can also contact Mosaics Supporthere.RequirementsPython 3.8 or above is required.DocumentationFor the latest documentation, seeMosaics AIQuickstartInstall the library withpip install pymsxNote: Don't hard-code authentication secrets into your Python. Use environment variablesemail/Password Authentication:exportMSX_USERNAME=*************exportMSX_PASSWORD=*************If you already have a token, use that instead:exportMSX_TOKEN=*****************************************Example usage:importosimportpandasaspdfrompymsx.clientimportMsxClient# If no credentials are supplied, then environment variables are required.email="help@mosaics.ai"password="$mosaics123"# ...or try using an active token.# This may fail, see exception handling below.token=None# First create client with active token or credentialsmsx=MsxClient(# ...using email/passwordemail=email,password=password,# ...or if using token, token will take prioritytoken=token)# Check the health of your serverhealth=msx.health().dict()print("Health: ",health)asserthealthisnotNoneandhealth['status']=='live'# Add a dataset to your msx system# From a DataFramepath="/path/to/dataset/data.csv"df=pd.DataFrame(path)result=msx.datasets.add(df=df)# Or pass in a string path to read from fs directlyresult=msx.datasets.add(path=path)ifresult.ok:print("DataFrame uploaded: ",result.details)elseprint("Upload failed: ",result.error)Exception handling:frompymsx.clientimportMsxClientfrompymsx.exceptionsimportApiResponseError,InvalidTokenErrortry:try:# An InvalidToken error is raised if the token is expired or incorrectmsx=MsxClient(token=token)exceptInvalidTokenError:print(f"Token invalid, logging in instead.")# Catch all other errors using ApiResponseErrorsmsx=MsxClient(email=email,password=password)exceptApiResponseErrorase:print(f"Could not create msx client:{e.error}")returnContributingWe will allow contributing soon!LicenseApache License 2.0
Package: pymsyt
PyMsytMSBT editing in Python using MSYTPyMsyt is a Python library wrapping theMSYT projectin Rust.
It uses acustom forkbuilt as both a library and application.
PyMsyt supports reading and writing MSBT files in binary, YAML, and JSON formats. Basic
documentation:APIClasspymsyt.MsbtClass representing an MSBT file. This is just a thin wrapper over theMsyttype from
the Rust MSYT project providing a few convenient methods for Python use. Note that
manipulating the contents of an MSBT in code can only be done staightforwardly by converting
withto_dict()andfrom_dict(). This class cannot be directly instantiated. Instead,
create it through static parsing methods. Example use:frompymsytimportMsbtdata=open("ArmorHead.msbt","rb").read()msbt=Msbt.from_binary(data)msyt_text=msbt.to_yaml()# Convert MSBT to MSYT YAMLjson_text=msbt.to_json()# Convert MSBT to JSONmsbt_dict=msbt.to_dict()# Convert to an editable Python dictionaryforentry,contentsinmsbt_dict["entries"].items()# Iterate MSBT text entriesprint(f"{entry}={contents}")msbt_dict["entries"]["Armor_999_Head"]={# Adding a new text entry"contents":[{"text":"Some new helmet"}]}open("ArmorHead.msbt","wb").write(# Saving modified fileMsbt.from_dict(msbt_dict).to_binary(big_endian=True))Methods defined here:to_binary(big_endian: bool) -> bytesSerializes this MSBT file to bytes.to_dict() -> dictConverts the MSBT contents to a Python dict.to_json() -> strGenerates a JSON representation of this MSBT file.to_yaml() -> strGenerates a YAML representation of this MSBT file.from_binary(data: BytesLike) -> MsbtParses an MSBT file from a byteslike objectfrom_dict(dict: dict) -> MsbtParses an MSBT file from a Python dictionary.from_json(json: str) -> MsbtParses an MSBT file from a JSON representation.from_yaml(yaml: str) -> MsbtParses an MSBT file from a YAML representation.Classpymsyt.MsytErrorGeneric exception thrown for all errors with this library.
Package: pymt5pure
pymt5pureMetaTrader 5 WebAPI implementation in Python.Installationpip install pymt5pureUsageCreate a client:frompymt5pureimportMT5Client,MT5Apiclient=MT5Client(host="111.111.111.111",port=443)client.connect(username="33007",password="112233")print("Connected!")# Basic command callresponse=client('SYMBOL_NEXT',INDEX=0)print(response.params)print(response.json)# Using MT5's Official objectsmt5=MT5Api(client)result=mt5.symbol_total()print(result)result=mt5.symbol_next(0)print(result.CurrencyBase,result.CurrencyProfit,result.Description)FeaturesBasic socket connectionAuthenticationConnection KeepAliveAES Encryption[~] MT5API interfaces (incomplete)
Package: pymt-era5
pymt_era5 is a package that convertsERA5 datasetsinto a reusable,
plug-and-play data component forPyMTmodeling framework
developed by Community Surface Dynamics Modeling System (CSDMS).
This allows ERA5 datasets (currently support 3 dimensional data) to be easily coupled with other datasets or models that expose
aBasic Model Interface.Installing pymtInstallingpymtfrom theconda-forgechannel can be achieved by addingconda-forgeto your channels with:conda config --add channels conda-forgeNote: Before installingpymt, you may want to create a separate environment
into which to install it. This can be done with,conda create -n pymt python=3
conda activate pymtOnce theconda-forgechannel has been enabled,pymtcan be installed with:conda install pymtIt is possible to list all of the versions ofpymtavailable on your platform with:conda search pymt --channel conda-forgeInstalling pymt_era5Please make sure to first install theCDS APIand then follow the command below to installpymt_era5:pip install pymt_era5Coding ExampleYou can learn more details about the coding example from thetutorial notebook.CreditsTian Gan <gantian127@gmail.com>Changelog for pymt_era50.2.0 (unreleased)0.1.0 (2021-09-09)Initial release
Package: pymt-landlab
PyMT plugins for landlab componentsFree software: MIT licenseDocumentation:https://landlab.readthedocs.io.ComponentPyMTOverlandFlowfrom pymt.models import OverlandFlowFlexurefrom pymt.models import FlexureLinearDiffuserfrom pymt.models import LinearDiffuserExponentialWeathererfrom pymt.models import ExponentialWeathererTransportLengthHillslopeDiffuserfrom pymt.models import TransportLengthHillslopeDiffuserVegetationfrom pymt.models import VegetationSoilMoisturefrom pymt.models import SoilMoistureInstalling pymtInstallingpymtfrom theconda-forgechannel can be achieved by addingconda-forgeto your channels with:conda config --add channels conda-forgeNote: Before installingpymt, you may want to create a separate environment
into which to install it. This can be done with,conda create -n pymt python=3.6
conda activate pymtOnce theconda-forgechannel has been enabled,pymtcan be installed with:conda install pymtIt is possible to list all of the versions ofpymtavailable on your platform with:conda search pymt --channel conda-forgeInstalling pymt_landlabOncepymtis installed, the dependencies ofpymt_landlabcan
be installed with:conda install landlabTo installpymt_landlab,conda install pymt_landlab
Package: pymt-nwis
pymt_nwis is a package that convertsbmi_nwis packageinto a reusable,
plug-and-play data component forPyMTmodeling framework.
This allows the National Water Information System (NWIS) data to be easily coupled with other data or models that expose
aBasic Model Interface.Installing pymtInstallingpymtfrom theconda-forgechannel can be achieved by addingconda-forgeto your channels with:conda config --add channels conda-forgeNote: Before installingpymt, you may want to create a separate environment
into which to install it. This can be done with,conda create -n pymt python=3
conda activate pymtOnce theconda-forgechannel has been enabled,pymtcan be installed with:conda install pymtIt is possible to list all of the versions ofpymtavailable on your platform with:conda search pymt --channel conda-forgeInstalling pymt_nwisTo installpymt_nwis,pip install pymt_nwisCoding ExampleYou can learn more details about the coding example from thetutorial notebook.CreditsTian Gan <gantian127@gmail.com>Changelog for pymt_nwis0.2.0 (2022-09-13)Update nwis to bmi_nwisUpdate the notebook content0.1.0 (2021-03-31)Initial release
Package: pymt-nwm
pymt_nwm is a package that convertsnwm packageinto a reusable,
plug-and-play data component forPyMTmodeling framework.
This allows the National Water Model datasets to be easily coupled with other datasets or models that expose
aBasic Model Interface.Installing pymtInstallingpymtfrom theconda-forgechannel can be achieved by addingconda-forgeto your channels with:conda config --add channels conda-forgeNote: Before installingpymt, you may want to create a separate environment
into which to install it. This can be done with,conda create -n pymt python=3
conda activate pymtOnce theconda-forgechannel has been enabled,pymtcan be installed with:conda install pymtIt is possible to list all of the versions ofpymtavailable on your platform with:conda search pymt --channel conda-forgeInstalling pymt_nwmTo installpymt_nwm,pip install pymt_nwmCreditsTian Gan <gantian127@gmail.com>Changelog for pymt_nwm0.2.0 (unreleased)0.1.0 (2021-03-22)Initial release
Package: pymtodo
Table of contentsDescriptionInstallingQuick startAuthorizingGet lists and tasksCreate lists and tasksDelete lists and tasksDocumentationDisclaimerLicenseDescriptionPymtodo is an unofficial Microsoft To-Do python library which allows managing your tasks. It can help you to optimize
your workflow and create long lists (for example, if you read books and like to check it in your To-Do list).InstallingYou can install pymtodo via pip:$gitclonehttps://github.com/efiminem/pymtodo.git$pipinstallpymtodoQuick startAuthorizingPymtodo is very easy to use. First, you need to be authorized in the Microsoft To-Do system:frompymtodoimportToDoConnectionfromgetpassimportgetpassa=ToDoConnection()a.connect(email='your-email@gmail.com',password=getpass())Getpass package allows you to write your password in the secure way, so noone will see it. Alternatively, you
can just type it directly.Get lists and tasksIn order to get all your lists you can just type:a.listsTo get the tasks for the particular list, you can write:a.lists[0].tasksCreate lists and tasksYou can create lists by usinga.create_list("New list")and new tasks can be created in the particluar list:a.lists[0].create_task("New task")Delete lists and tasksYou can delete your lists and tasks by the delete method:a.lists[0].delete()a.lists[0].tasks[0].delete()Be careful, there will not be a warning message.DocumentationDetailed documentation will be available soon.DisclaimerPymtodo is an unofficial, open source, third-party, free app and is not affiliated in any way with Microsoft.LicensePymtodo is distributed under the MITlicense.
Package: pymtools
🧾README Version: 0.1.8⚙️ MisctoolsMiscellaneous tools to speed up and improve your code.The package is divided by modules that contain functions to diferent related situation🗂 Modules:misc-General funcs with no clear purposeopsys-Some util funcs to access and manage systemcolors-Util functions to handle color management (conversions, random picker, ...)net-Some util funcs to extract information about networkext-Aditional small module to extract the list of colors in a image. Intended to use to study images/patron-color imagesexports-Some util funcs to make exports easier. Current langs that can export each other -> [JSON, YAML, CSV, TOML, XML]⬇️ Install packageLinux(Posix)To install the library, do:pip3 install -U misctools --user-> To install the library ONLY in user contextpip3 install -U misctools-> To install the library in global context⭐ Windows (NT):*Currently the library is not in PyPi.
To install the library withPyPi&pip, do:pip install -U misctools --user-> To load the library ONLY in user contextpip install -U misctools-> To load the library in global context📌 To install with PyPi, dopip install -U misctools📌 To installwithoutPyPi, dopip install -U git+https://github.com/Backist/Misctools❕If u want to install the library without PyPi, then u must haveGITinstalled.Install GITExceptions & Errors:If for any reason you can not install the library viaPyPi & pipyou will have to install it manually.
...ℹ️NOTE: This module have been created to be used inWindows | NT systems, because implemets some functions and methods that couldn't be runned inLinux | Posix systems, this does not mean that some functions can work correctly.
Package: pymtpng
Python mtpngPython bindings for theMTPNG library, a parallelized PNG encoder in Rust by Brion Vibber.Usageimportpymtpng...# Encode numpy uint8 array to PNGwithopen("image_uint8.png","wb")asfh:pymtpng.encode_png(image_uint8,fh)...# Encode numpy uint16 array to PNGwithopen("image_uint16.png","wb")asfh:pymtpng.encode_png(image_uint16,fh)...# Customize encoding optionspymtpng.encode_png(image,fh,filter=pymtpng.Filter.Adaptive,compression_level=pymtpng.CompressionLevel.Fast,strategy=pymtpng.Strategy.Huffman,)...# Store key-value pairs as iTXt chunkspymtpng.encode_png(image,fh,info={"Hello":"World"})
Package: pymt-rafem
PyMT plugin for RafemFree software: MIT licenseDocumentation:https://rafem.readthedocs.io.Installing pymtInstallingpymtfrom theconda-forgechannel can be achieved by addingconda-forgeto your channels with:conda config --add channels conda-forgeNote: Before installingpymt, you may want to create a separate environment
into which to install it. This can be done with,conda create -n pymt python=3.6
conda activate pymtOnce theconda-forgechannel has been enabled,pymtcan be installed with:conda install pymtIt is possible to list all of the versions ofpymtavailable on your platform with:conda search pymt --channel conda-forgeInstalling pymt_rafemOncepymtis installed, the dependencies ofpymt_rafemcan
be installed with:conda install rafemTo installpymt_rafem,conda install pymt_rafem
Package: pymt-roms
pymt_roms is a package that convertsbmi_romspackage into a reusable,
plug-and-play data component forPyMTmodeling framework
developed by Community Surface Dynamics Modeling System (CSDMS).
This allowsROMS modeldatasets
to be easily coupled with other datasets or models that expose aBasic Model Interface.The current implementation supports 2D, 3D and 4D ROMS output datasets defined with geospatial and/or time dimensions (e.g.,
dataset defined with dimensions as [time, s_rho, eta_rho, xi_rho])ComponentPyMTRomsfrom pymt.models import RomsInstalling pymtInstallingpymtfrom theconda-forgechannel can be achieved by addingconda-forgeto your channels with:conda config --add channels conda-forgeNote: Before installingpymt, you may want to create a separate environment
into which to install it. This can be done with,conda create -n pymt python=3
conda activate pymtOnce the environment is activated,pymtcan be installed with the following command.
Please note that thepymt_romsrequires the development version ofpymt(e.g., v1.3.2dev0).pip install git+https://github.com/csdms/pymt.gitInstalling pymt_romsTo installpymt_roms, use pippip install pymt_romsor condaconda install -c conda-forge pymt_romsCoding ExampleYou can learn more details about the coding example from thetutorial notebook.CreditsTian Gan <gantian127@gmail.com>Changelog for pymt_roms0.2.0 (unreleased)0.1.0 (2023-04-04)Initial release
Package: pymt-soilgrids
pymt_soilgrids is a package that convertssoilgrids packageinto a reusable,
plug-and-play data component forPyMTmodeling framework.
This allows the soil datasets to be easily coupled with other datasets or models that expose
aBasic Model Interface.Installing pymtInstallingpymtfrom theconda-forgechannel can be achieved by addingconda-forgeto your channels with:conda config --add channels conda-forgeNote: Before installingpymt, you may want to create a separate environment
into which to install it. This can be done with,conda create -n pymt python=3
conda activate pymtOnce theconda-forgechannel has been enabled,pymtcan be installed with:conda install pymtIt is possible to list all of the versions ofpymtavailable on your platform with:conda search pymt --channel conda-forgeInstalling pymt_soilgridsTo installpymt_soilgrids,pip install pymt_soilgridsCreditsTian Gan <gantian127@gmail.com>Changelog for pymt_soilgrids0.2.0 (unreleased)0.1.0 (2021-02-26)Initial release
Package: pymtt
PyMTT is a command-line text transformer. It allows you to renderJinja2templates using context created from pure Python modules or shell environment
variables. Primary usage is config generation for deployment.PyMTT was inspired by Oleg Mamontov’sMTTbut uses Python, not Perl.Example usageexport DJANGO_SETTINGS_MODULE=settings_test
pymtt -e -d -b config.py ~/template.proto ~/templateThis command creates context fromsettings_testDjango module (-d switch),
overwrites it withconfig.pyand finally overwrites context with environment
variables if any (-e switch). Then uses context to rendertemplateout oftemplate.proto.Installationpip install pymtt