Saravanan666/pypi-org huggingface dataset:
Package: py-mon
py-monA modern, easy-to-use package to automatically restart a Python application when file changes are detected!QuickstartI wanted to make this package as easy as possible to use. Here's a quick start, it's all you'll need 😼Installationpip install -U py-monExecutionpymon filename.pyThat's pretty much it! 😌If you have a more sophisticated use-case, there are three other arguments you can utilize:--patterns(-p) to specify what file patterns to monitor. default:*.py--watch(-w) to specify what directory to monitor for changes. default:.--args(-a) to pass arguments to the execute script.Examples:pymon test.py -p "*.json"will monitor changes in python and json filespymon test.py -p "*.json" -w "./data"will only monitor changes in python and json files within thedatadirectorypymon test.py --args "dev mode"will essentially run the programpython3 test.py dev modeAnyway thats basically it! Thanks for everything, I would appreciate it if you could leave a follow or star this repository ❣️ If you have any feature requests, read below!ContributingThis package is open source so anyone with adequate Python experience can contribute to this project!Report IssuesIf you find any issues with the package or in the code, pleasecreate an issue and report it here!Fix/Edit ContentIf you want to contribute to this package, fork the repository, clone it, make your changes and thenproceed to create a pull request hereInspirationBack when I was 13, I spent a lot of time developing discord bots and it was a hassle to constantlyCtrl+Cand then run the bot again on my terminal. Since I had just gotten started with web development back then, I decided to make something likenodemonbut for Python so I randomly created this package one evening! I looked back at it a few weeks ago (I'm now 16) and realized over a thousand people download it every month so I quickly rewrote it (v2) to clean it up and add some new features!
Package: py-monadic-error-handling
Py Monadic Error Handling DocumentationInstalationThe library is available via pip through the following command:pip install py-monadic-error-handlingHow to useFirst import the safe decorator from py_monadic_error_handling.from py_monadic_error_handling import safeThen decorate your functions with the safe decorator.@safe
def func1(n1, n2): 
    return n1 + n2

@safe
def func2(n1, n2): 
    return n1 / n2Each of those functions will return a Ok or Err object, witch are subclasses of Result and may take Ok or Err objects as parameters.If they return a Ok object, the function executed with no errors and the value can be accessed via the unwrap method.res = func1(1, 0).unwrap()
print(res)
>>> 1If they return a Err object, the function executed with an error and the error can be raised via the unwrap method.unwrap takes no arguments and raise an exception or returns anyres = func2(1, 0).unwrap()
>>> ZeroDivisionError: division by zeroYou can access the value of the Ok object directly by using the Ok property or the error type in an Err object directly by using the Err property.res = func1(1, 0).Ok
print(res)
>>> 1
res = func2(1, 0).Err
print(res)
>>> division by zeroYou can know if the function returned a Ok or Err object by using the is_ok and is_err methods.Both methods take no arguments and return a boolres = func1(1, 0).is_ok()
>>> True
res = func2(1, 0).is_err()
>>> TrueYou can safely unwrap an Ok or Err object with the unwrap_or method.unwrap_or takes one argument of any type.If the object is an instance of Ok, it returns object.Ok.If the object is an instance of Err, it returns the argument you entered.res = func1(1, 0).unwrap_or(-1)
print(res)
>>> 1
res = func2(1, 0).unwrap_or(-1)
print(res)
>>> -1You can safely unwrap an Ok or Err object with the unwrap_or_else method.unwrap_or_else takes a function as its argument.The function takes an exception as its argument and may or may not return a value.If the object is an instance of Ok, it returns object.Ok.If the object is an instance of Err, it executes the function with the object.Err as its parameter and return its return value.def handle_error(e):
    print(e)
    return -1

res = func1(1, 0).unwrap_or_else(handle_error)
print(res)
>>> 1
res = func2(1, 0).unwrap_or_else(handle_error)
>>> division by zero
print(res)
>>> -1Railway Error HandlingBy chaining functions decorated with safe, each function will excecute and if there is an error, it will return an Err object that will be caried through every function that depends on its return without executing them, othewise it will return an Ok value that can be taken as normal as argument for any other function decorated with safen1 = func1(1, 0)
>>> Ok(1)
n2 = func1(2, -2)
>>> Ok(0)
n3 = func2(n1, n2)
>>> Err(ZeroDivisionError)
n4 = func1(n3, 3)
>>> Err(ZeroDivisionError)
n5 = func1(n2, n1)
>>> Ok(0)In this exemple, func1(n3, 3) is never executed because it depends on the return of a function that executed with an error, but func1(n1, 4) executes, because even though it executes later on the chain, it depends only on the return of functions that executed without any errors
Package: pymondis
PYMONDISNieoficjalny wrapper apiQuatromondisw pythonieFajne rzeczyWszystkie zapytania są asynchroniczne z użyciemhttpxModułshelludostępnia prosty interfejs do używania biblioteki bez konieczności tworzenia asynchronicznej funckjiFajnie obiekty z użyciemattrs(nawetrepr()działa!)Ponawianie nieudanych zapytańEpicka składnia pythona 3.10 (dlatego na razie można korzystać tylko z 3.10)Cache'owanie zdjęćType hintyCo możesz zrobićDostać listę wszystkich aktualnych obozówDostać listę wszystkich aktualnych galeriiDostać listę wszystkich zamków z aktywną fotorelacjąDostać listę wszystkich psorów z opisami (bez biura i HY)Dostać listę wszystkich kandydatów plebiscytów od 2019Zagłosować w plebiscyciePobrać wszystkie zdjęcia zaktualnychgaleriiMęczyć się debugowaniem przez 5 godzin, bo zapomniałeś daćawait;)Czego już nie możesz zrobić ;(Do początku 2022 można było zobaczyć fotorelację nawet z 2019 roku, ale już bloby zaczęły znikać.
To była główna funkcjonalność biblioteki — pobieranie starych niedostępnych na stronie zdjęć,
ale informatycy pożałowali miejscem na dysku i je usunęli. Przepraszam wszystkich którzy przyszli tutaj z nadzieją
odtworzenia swoich dawnych wspomnień. Polecam pobierać całe galerie, póki jeszcze nie zostały usunięte, na szczęście
zdążyłem pobrać zdjęcia ze swoich wszystkich starych turnusów.Co prawdopodobnie możesz zrobićZarezerwować miejsce w inauguracjiZamówić książkęZarezerwować miejsce na obozieDostać informacje o rezerwacji obozuZgłosić się o pracęInstalacjaAktualnachybadziałająca wersjapipinstallpymondisAktualna wersjapipinstallgit+https://github.com/Asapros/pymondis.git
Package: pymonetdb
Introductionpymonetdb is a native python client API for monetDB. This API is cross-platform,
and doesn’t depend on any monetdb libraries. It has support for Python 3.6+
and PyPy. The driver is Python DBAPI 2.0 compatible.InstallationThe quickest way to get started is to install pymonetdb from pypi:$ pip install pymonetdbDocumentationYou can find the online pymonetdb documentation athttp://pymonetdb.readthedocs.io/LicenseThis Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0.  If a copy of the MPL was not distributed with this
file, You can obtain one athttp://mozilla.org/MPL/2.0/.
Package: py-moneyed
OverviewThe need to represent instances of money frequently arises in software
development, particularly any financial/economics software. To address that
need, the py-moneyed package provides the classes of Money and Currency, at a
level more useful than just using Python’s Decimal class, or ($DEITY forbid) the
float primitive. The package is meant to be stand-alone and used directly, or
be subclassed further. py-moneyed is BSD-licensed.Quick startTo install:pip install py-moneyedUse:frommoneyedimportMoney,USDfive_dollars=Money(5,USD)You then useMoneyobjects as if they were numbers, and they behave
sensibly. Seedocsfor more
information (or thedocs/folder).HistorySome of the py-moneyed code was first derived from python-money
available via this URL:http://code.google.com/p/python-money/Due to inactivity, it was forked by @limist in 2010 and later
moved to the py-moneyed organization.
Package: py-money-legos
py-money-legosmoney-legosis an NPM package that provides you with themainnet addresses,ABIs, andSolidity interfacesfor popular DeFi protocols.py-money-legosis its Python versionInstallpipinstallpy-money-legosUsagePlease check the main javascript repo for more on how to use:https://github.com/studydefi/money-legosDocs of javascript version:https://money-legos.studydefi.com/Discord for javascript version:https://discord.gg/rBr3U32test.py includes a sample to get MKR price from UNISWAP using the Web3, you will need to pip install web3 for this to work, it is commented to remove dependency with this library.Sample Importfrommoney_legos.uniswap.contractsimportcontractsfactory_abi=contracts["factory"]["abi"]exch_abi=contracts["exchange"]["abi"]HelpFeel free to contribute or contact me for any help or comments
Package: pymongoarrow
PyMongoArrowPyMongoArrowis a companion library to PyMongo that contains tools
for loading MongoDB query result sets as Apache Arrow tables, Pandas
DataFrames or NumPy arrays.>>>frompymongoarrow.monkeyimportpatch_all...patch_all()...frompymongoarrow.apiimportSchema...schema=Schema({"_id":int,"qty":float})...frompymongoimportMongoClient...client=MongoClient()...client.db.data.insert_many(...[{"_id":1,"qty":25.4},{"_id":2,"qty":16.9},{"_id":3,"qty":2.3}]...)...data_frame=client.db.test.find_pandas_all({},schema=schema)...data_frame_id   qty0    1  25.41    2  16.92    3   2.3... arrow_table = client.db.test.find_arrow_all({}, schema=schema)# The schema may also be omitted... arrow_table = client.db.test.find_arrow_all({})... arrow_tablepyarrow.Table_id: int64qty: double... ndarrays = client.db.test.find_numpy_all({}, schema=schema)... ndarrays{'_id': array([1, 2, 3]), 'qty': array([25.4, 16.9,  2.3])}PyMongoArrowis the recommended way to materialize MongoDB query
result sets as contiguous-in-memory, typed arrays suited for in-memory
analytical processing applications.Installing PyMongoArrowPyMongoArrow is available on PyPI:python-mpipinstallpymongoarrowTo use PyMongoArrow with MongoDB Atlas'mongodb+srv://URIs, you will
need to also install PyMongo with thesrvextra:python-mpipinstall'pymongo[srv]'pymongoarrowTo use PyMongoArrow APIs that return query result sets as pandas
DataFrame instances, you will also need to have thepandaspackage
installed:python-mpipinstallpandasNote:pymongoarrowis not supported or tested on big-endian systems
(e.g. Linux s390x).Development InstallSee the instructions onRead the
Docs.DocumentationFull documentation is available onRead the
Docs.
Package: pymongo-auth-aws
Info:MONGODB-AWS authentication support for PyMongo. SeeGitHubfor the latest source.Author:Shane HarveyAboutMONGODB-AWS authentication support for PyMongo. pymongo-auth-aws usesboto3,botocore, andrequests.Support / FeedbackFor issues with, questions about, or feedback for pymongo-auth-aws, please look into
oursupport channels. Please
do not email any of the pymongo-auth-aws developers directly with issues or
questions - you’re more likely to get an answer on theMongoDB Community Forums.Bugs / Feature RequestsThink you’ve found a bug? Want to see a new feature in pymongo-auth-aws?
Please open a case in our issue management tool, JIRA:Create an account and login.Navigate tothe PYTHON project.ClickCreate Issue- Please provide as much information as possible about the issue type and how to reproduce it.Bug reports in JIRA for all driver projects (i.e. PYTHON, CSHARP, JAVA) and the
Core Server (i.e. SERVER) project arepublic.How To Ask For HelpIssues with, questions about, or feedback for pymongo-auth-aws should be sent
to theMongoDB Community Forums.Please include all of the following information when opening an issue:Detailed steps to reproduce the problem, including full traceback, if possible.The exact python version used, with patch level:$ python -c "import sys; print(sys.version)"The exact version of pymongo-auth-aws used:$ python -c "import pymongo_auth_aws; print(pymongo_auth_aws.__version__)"The exact version of PyMongo used:$ python -c "import pymongo; print(pymongo.version); print(pymongo.has_c())"The operating system and version (e.g. Windows 10, OSX 10.15, …)Web framework or asynchronous network library used, if any, with version (e.g.
Django 3.0, mod_wsgi 4.7.1, gevent 20.5.2, Tornado 6.0.4, …)Security VulnerabilitiesIf you’ve identified a security vulnerability in a driver or any other
MongoDB project, please report it according to theinstructions here.Installationpymongo-auth-aws can be installed withpip:$ python -m pip install pymongo-auth-aws
$ python -c "import pymongo_auth_aws; print(pymongo_auth_aws.__version__)"
1.0.0Installing from sourceTo install pymongo-auth-aws from source:$ git clone git@github.com:mongodb/pymongo-auth-aws.git
$ python -m pip install ./pymongo-auth-awsDependenciespymongo-auth-aws supports CPython 2.7, 3.4+, PyPy, and PyPy3.5+.pymongo-auth-aws requiresbotocoreandrequests.TestingInstall the test dependencies and run the test suite.$ python -m pip install -e “.[test]”
$ python -m unittest discover ./test
Package: pymongoback
# PyMongoBack**PyMongo** Back is a simple Python library designed to help you create MongoDB Backups from both local and remote servers.## InstallYou can easily install it using the following command:sudo pip3 install pymongoback> In the server that is going to execute the script, it will be necessary to have installed **MongoDB** or  **Mongodb Tools**. Since you need to have installed mongodump.## UsageStarting to use PyMongoBack is very simple. You only need to import the library and create an object PyMongoBackup() with the parameters that you prefer.|Param|Type|Description||--|--|--||username|str|Username for login MongoDB. Default None.||password|str|Password for login MongoDB. Default None.||host|str|IP address of the MongoDB server. Default 'localhost'.||days_backup|int|Maximum days that are saved backup. Default None (always save).||path_backup|str|Path where the backup is saved. Default './BackupMongo'.||log|bool|Indicates if the output is written to a log file. Default False.||path_log|str|Path where the log is saved. Default './BackupMongo/log'.||prefix|str|Indicates the prefix with which the backup will be saved. Default 'back_'.||datetime_format|str|Indicates the date format to name the backup. Default '%Y-%m-%d_%H-%M'.|> Example of name backup file: back_2019-03-09_12-21.zip|Methods|Description|Arguments||--|--|--||create_full_backup()|Create a backup of all databases|||create_backup('db1')|Create a backup of a database|Name of database||create_multidb_backup(['db1','db2'])|Create a backup of several databases|List with the databases to make the backup|### ExamplesBackup of all databases on the local server.import pymongobackback = pymongoback.PyMongoBackup()back.create_full_backup()Backup of a database on the remote server and changing the prefix.import pymongobackbackone = pymongoback.PyMongoBackup(username='Rafa', password='pass1234',host='192.168.1.221', days_backup=5, prefix='backremote_')backone.create_backup('db1')Backup of two databases by changing the path where they are saved and log file activated.import pymongobackbackmulti = pymongoback.PyMongoBackup(username='Rafa', password='pass1234', path_backup="/var/BackupMongo", log=True, path_log='/var/log/BackupMongo/log', prefix='multiback_')databases = ['db1','db2']backmulti.create_multidb_backup(databases)
Package: pymongo-bongo
Info:Seethe mongo sitefor more information. Seegithubfor the latest source.Author:Alexander Artemenko <svetlyak.40wt@gmail.com>AboutThe PyMongoBongo distribution contains wrappers to add some syntax sugar toPyMongofor easier interaction with the Mongo database using “python way”.ChangeLog0.1.3Fixed __len__ method, broken by changes in pymongo 1.1.1. Now mongobongo depends on pymongo >= 1.1.1.0.1.2Fixed ordering in case, when ‘find_one’ is used.Fixed default cursor ordering, now it is applied in the constructor.0.1.1Added automatic DBRef usage, when one document contains another. Here is an example:>>> author = Author(name = 'Alexander')
>>> article =  Article(title = 'Life is miracle', author = author)
>>> Author.objects.count()
0
>>> article.save()
>>> article = Article.objects.find_one()
>>> article.author.name
'Alexander'
>>> Author.objects.count()
10.1.0Basic support for documents with attributes.InstallationIf you havesetuptoolsinstalled you should be able to doeasy_install pymongo-bongoto install PyMongoBongo. Otherwise you can download the project source and dopython setup.py installto install.DependenciesThe PyMongoBongo depends on PyMongo >= 1.1.1Additional dependencies are:(to generate documentation)epydoc(to auto-discover tests)noseExamplesHere’s a basic example:>>> from pymongo.connection import Connection
>>> from mongobongo import Document
>>> class Article(Document):
...     collection = 'articles'
...     def get_full_title(self):
...         return '%s (%s)' % (self.title, ', '.join(self.tags))
>>> connection = Connection("localhost", 27017)
>>> Article.objects.db = connection.test
>>> article = Article(author = 'Alex', title = 'Pink Pony\'s Life', tags = ['mongo', 'bongo'])
>>> article.save()
>>> articles = Article.objects.all()
>>> len(articles)
1
>>> article = Article(author = 'Alex', title = 'Long Long Python', tags = ['python', 'devel'], subtitle = 'Not such long')
>>> article.save()
>>> articles = Article.objects.all()
>>> len(articles)
2
>>> python_articles = Article.objects.find({'tags': 'python'})
>>> len(python_articles)
1
>>> python_articles[0].title
'Long Long Python'DocumentationYou will needepydocinstalled to generate the documentation. Documentation can be generated by runningpython setup.py doc. Generated documentation can be found in thedoc/directory.TestingThe easiest way to run the tests is to installnose(easy_install nose) and runnosetestsorpython setup.py testin the root of the distribution. Tests are located in thetest/directory.CreditsSlava Vishnyakov, for ‘Document.remove’ method.Wanna be listed here? Go to the GitHub, fork the project and send me patches :)
Package: pymongoext
PymongoextPymongoext is an ORM-like Pymongo extension that adds json schema validation,
index management and intermediate data manipulators.
Pymongoext simplifies working with MongoDB, while maintaining a syntax very identical to Pymongo.pymongoext.Modelis simply a wrapper aroundpymongo.Collection.
As such, all of the pymongo.Collection API is exposed through pymongoext.Model.
If you don’t find what you want in the pymongoext.Model API,
please take a look at pymongo’s Collection documentation.Documentation is available athttps://pymongoext.readthedocs.ioThe code is hosted on Githubhttps://github.com/musyoka-morris/pymongoextFeaturesschema validation (which uses MongoDB JSON Schema validation)schema-less featurenested and complex schema declarationuntyped field supportrequired fields validationdefault valuescustom validatorsoperator for validation (OneOf, AllOf, AnyOf, Not)indexes managementdata manipulators (transform documents before saving and after retrieval)Easy to create custom data manipulatorsobject-like results instead of dict-like. (i.e. foo.bar instead of foo[‘bar’])No custom-query language or API to learn (If you know how to use pymongo, you already know how to use pymongoext)Supported MongoDB & Python VersionsPymongoext uses JSON Schema for validation and thus we only support
MongoDB v3.6+.Pymongoext supports python v3+. Support for python v2.7 is currently under consideration.InstallationWe recommend the use ofvirtualenvand ofpip. You can then usepip install-Upymongoext.You may also havesetuptoolsand thus you can useeasy_install-Upymongoext. Another option ispipenv. You can then usepipenv install pymongoextto both create the virtual environment and install the package.Alternatively, you can download the source fromGitHuband
runpython setup.py install.ExamplesSome simple examples of what pymongoext code looks like:fromdatetimeimportdatetimefrompymongoimportMongoClient,IndexModelfrompymongoextimport*classUser(Model):@classmethoddefdb(cls):returnMongoClient()['my_database_name']__schema__=DictField(dict(email=StringField(required=True),name=StringField(required=True),yob=IntField(minimum=1900,maximum=2019)))__indexes__=[IndexModel('email',unique=True),'name']classAgeManipulator(Manipulator):deftransform_outgoing(self,doc,model):doc['age']=datetime.now().year-doc['yob']returndoc# Create a user>>>User.insert_one({'email':'jane@gmail.com','name':'Jane Doe','yob':1990})# Fetch one user>>>user=User.find_one()# Print the users age>>>print(user.age)ContributingWe welcome contributions!
See theContribution guidelines
Package: pymongo_hadoop
Info:Seedocumentationfor more information. Seegithubfor the latest source.Author:Brendan McAdamsMaintainer:Mike O’Brien <mikeo@10gen.com>AboutThe pymongo_hadoop module contains basic classes for using python
scripts for Hadoop Streaming jobs with the mongo-hadoop adapter.Issues / Questions / FeedbackAny issues with, questions about, or feedback for pymongo_hadoop should be
sent to the mongodb-user list on Google Groups. For confirmed issues
or feature requests, open a case onjira. Please do not e-mail any of the
developers directly with issues or questions - you’re more likely to
get an answer on the list.InstallationIf you havesetuptoolsinstalled you
should be able to doeasy_install pymongo_hadoopto install
the module. Otherwise you can download the project source and dopython
setup.py installto install.
Package: pymongoimport
Pymongo_import is a program that can parse a csv file from its header and first line to
create an automated type conversion file (a .ff file) to control how types in the CSV
file are converted. This file can be edited once created (it is a ConfigParser format file).
For types that fail conversion the type conversion will fail back on string conversion.
Blank columns in the CSV file are marked as [blank-0], [blank-1] … [blank-n] and are ignored
by the parser.
Package: pymongolab
Info:SeePyMongoLab documentation sitefor more information. SeeGitHub repositoryfor the latest source.Author:Jorge Puente Sarrín <puentesarrin@gmail.com>AboutPyMongoLab is aPythonclient library that contains tools for accessing to
MongoLab databases viaMongoLab REST APIusing a similar sintax toPyMongo.>>> from pymongolab import MongoClient
>>> con = MongoClient("MongoLabAPIKey")
>>> db = con.database
>>> col = db.collection.find()
>>> list(col)
[{u'_id': ObjectId('50243d38e4b00c3b3e75fc94'), u'foo': u'bar', u'tld': u'com'},
{u'_id': ObjectId('50004d646cf431171ed53846'), u'foo': u'bar', u'tld': u'org'}]InstallationYou can usepipto install PyMongoLab:$ pip install pymongolabOr using last source:$ git clone git://github.com/puentesarrin/pymongolab.git
$ cd pymongolab
$ python setup.py installDocumentationSphinxmust be installed to generate the documentation. Documentation can be
generated by runningpython setup.py doc.