Saravanan666/pypi-org huggingface dataset:
Package: postcard
PostcardPOP3/IMAP/SMTP client and more!Thanks for use.How to usePOP3For decoratorfrompostcardimportPop3pop=Pop3()@pop.process(user="xxx",pwd="xxx")defget_content():content=pop.retrieve()["content"]print(content)For usualfrompostcardimportPop3pop=Pop3()pop.login(user="xxx",pwd="xxx")...pop.close()SMTPfrompostcardimportSmtpsmtp=Smtp()@smtp.process(user="xxx",pwd="xxx")defsend():ret=smtp.send_mail(subject="xx",content="xx",receiver="xx")print(ret)IMAPfrompostcardimportImapimap=Imap()@imap.process(user="xxx",pwd="xxx")defget_content():content=imap.retrieve()["content"]# If you want to mark as read, please set readonly to False.print(content)
Package: postcell
Real-time Jupyter Code Feedback (beta software)This project provides a magic command to users of Jupyter Notebook.The contents of a cell are sent to a remote server at the time of cell execution. This allows teachers in a class to mark certain cells with%postcellmagic command and view how their students are performing those exercises in real-time. Instructors can sign up for this service athttps://postcell.ioPre-requisitesThis utility is designed to work within Jupyter notebooks.Installationpip install postcellUsageSince contents of a cell are sent to a remote server, do the following to set up the server:Go tohttps://postcell.ioto create an accountCreate a new class and clickSample configto get configuration informationCreate a file calledpostcell.confin your project directory and paste the contents of the sample config dialog box. Here is an example:{"url":"https://postcell.io/post_cell","student_id":"TEST_USER","instructor_id":"INSTRUCTOR_ID_GENERATED_BY_THE_PROCESS_ABOVE","class_id":"PythonForPoets","should_send_to_server":true}Load and register the newly created class%reload_ext postcell
%postcell registerTheregistercommand will automatically look forpostcell.confin the directory containing your notebook, or any of the parent directories.You can also give an explicit config file name as:%postcell register -config C:\Users\...\custom_postcell.confIf you prefer not to use a physical config file, you can pass in the following properties:%postcell register -student_id STUDENT_USER_NAME -instructor_id INSTRUCTOR_ID -class_id python_introSubmit codeCreate a cell and give it an exercise name:%%postcell TEST_EXERCISE1

1+1Executing this cell will send the code to a server, where an instructor will be able to view submission in real-time. An instructor can monitor their students' progress, provide real-time feedback and even share the submission screen to show sudents how their classmates solve the same exercise.
Package: postcodeapi
postcodeapiis an unofficial Python wrapper around the Postcode API
V2.Installation and usageInstallationpostcodeapican be installed by runningpip install postcodeapi.UsageHere is an example of how to use the API client. First you initialize a
client with your API key, after that you use one of the four getter
methods to fetch the data you need. They all return the actual JSON
response converted to a Python dictionary.# Import the PostcodeAPIClientfrompostcodeapi.clientimportPostcodeAPIClient# Initialize a client with your API keyclient=PostcodeAPIClient(api_key="YOUR_API_KEY")# Fetch a list of addresses (for a given postal_code and number)# The postal_code and number parameters are optional# The number parameter only works together with postal_codedata=client.get_all_addresses(postal_code="5038EA",number=19)addresses=data["results"]# List of addressesnext_id=data["next"]# Next ID to search from (used for pagination)# Fetch a single addressaddress=client.get_address(address_id="0855200000046355")# Fetch a list of postal codes (within a specific area)# The area parameter is optionaldata=client.get_all_postal_codes(area="5038")postal_codes=data["results"]# List of postal codesnext_postal_code=data["next"]# Next postal code to search from (used for pagination)# Fetch a single postal codepostal_code=client.get_postal_code("5038EA")ExceptionsThere are 5 exceptions that can occur:NoAccessException, which occurs when the current account does not
have the required privileges to perform the action;ResourceNotFoundException, which occurs when the returned
status_code is 404. Limited to theget_addressandget_postal_codemethods;HouseNumberRequiresPostalCodeException, which occurs when a
house_number is given but not a postal_code. Limited to theget_all_addressesmethod;InvalidPostalCodeException, which occurs when an invalid postal
code is given;LimitExceededException, which occurs when there are too many
network requests or the limit has been exceededDocumentationFor more information about the data that is returned, please refer to
theofficial API documentation. It is written in Dutch.Running testsTo run the tests, make sure you install the dev dependencies by runningpipenv install--dev, and then run
Package: postcodes_io
Postcodes.io Python Client - alphaPython client to connect to Postcodes.io APIFree software: MIT licenseDocumentation:https://postcodes-io.readthedocs.io.FeaturesSupports python 3.x (not yet python 2.x, sorry!)Response in Python native list and dict typesSupports freehttp://postcodes.io/postcodesREST service and self-hosted service (See documentation for installation details)Quick StartInstall python package:$pipinstallpostcodes_io$pythonfrompostcodes_ioimportPostcodespio=Postcodes()postcode=pio.get('SW1A 1AA')Self-hosted Service using DockerPull docker image:docker pull randomvariable/docker-postcodes.ioRun docker container as a daemon:docker run -p 8000:8000 -d randomvariable/docker-postcodes.ioExecute API using hostsfrompostcodes_ioimportPostcodespostcode=Postcodes('http://localhost:8000').get('SW1A 1AA')TODOsAdd more endpointsDocumentationProper isolated unit testsHistory0.1.0 (2016-07-08)First release on PyPI.
Package: postcodes-uk
UK postcodes libraryRequirements :Python 3.6How to install it ?Using PIPpip install postcodes-ukManuallyIn the root folder execute :python setup.py installHow to use it ?Validate a postcodeimport postcodes_uk
postcodes_uk.validate("EC1A 1BB")This will return a boolean with the validation result.Format a postcodefrom postcodes_uk import Postcode
postcode = Postcode(area="EC", district="1A", sector=1, unit="BB")
print(postcode)This will print the formatted postcode.Create a Postcode object from a stringfrom postcodes_uk import Postcode
postcode = Postcode.from_string("EC1A 1BB")
print(postcode.area)This could be useful to extract the area/district/sector/unit from the postcode.How to execute the tests ?In the root folder, execute :pytest
Package: postcode-validator
A Postcode Validator Library.The initial releas includes validation for only UK PostcodesInstallpostcode_validator is available on PyPI:$pipinstallpostcode-validatorUsagefrompostcode_validator.uk.uk_postcode_validatorimportUKPostcodepostcode=UKPostcode('w1a0ax')postcode.postcode# output'W1A 0AX'postcode.outward# output'W1A'postcode.inward# output'0AX'postcode.area# output'W'postcode.district# output'1A'postcode.sector# output'0'postcode.unit# output'AX'
Package: postconfirm
CautionThis is an alpha release.  While the functionality is sound, the
packaging is probably not even beta quality.  Compilation of the
components written in C has only been tested under Linux.Descriptionpostconfirm consists of postconfirmd, which is the long-running
(daemon) part, and postconfirmc, which is the client part of a
client-server program which handles email confirmations. It is
intended as a front-end to mailing lists. It provides
funcitonality which is a subset of TMDA, but is adapted to
high-volume usage and does not have anywhere near all the bells
and whistles which TMDA has. On the other hand, since the
whitelist lookup is done by the long-running server part, the
overhead of doing a verification that a poster has a confirmed
address is much smaller than for TMDA.  This makes it a factor
1000 or more faster than TMDA in production, with a memory footprint
a factor 20 smaller.ChangelogVersion 0.42.1 (31 Jul 2018)Added domain name normalization (to lowercase) before checking whether we
got a hit on the _dmarc domain lookup.  Commented out verbose wall-time
log messages.Version 0.42.0 (09 May 2018)Added a check on the sender address during dmarc-reverse processing,
requiring that the sender is whitelisted or has a confirmed address.Changed the logging of dmarc-reverse processing to use a more compact
log line format, and commented out some debug logging statements.Added exception catching and loggin for failures to open smtp sessions
to the configured server and port.Fixed a log writing bug.Version 0.41.5 (20 Apr 2018)Fixed dmarc_reverse() to not re-send to other addresses than the
indicated recipient.
Package: postDB
postDBA WIP asynchronous database module for PostgreSQL databases.Example Usage:frompostDBimportModel,Column,typesclassUser(Model):id=Column(types.Integer(big=True),primary_key=True)username=Column(types.String)email=Column(types.String,unique=True)if__name__=='__main__':print(User.create_table_sql())Find more examplesHERE!
Package: postdoc
A helper for Postgres + Docker that works for freeAboutA wrapper that wraps a postgres command with connection arguments according to
the DATABASE_URL environment variable.I originally made this because manually typing the connection args topqsl,createdb, etc. became tiring. “Ain’t nobody got time for dat”.Let’s say your environment is like this:$ env | grep DATABASE_URL
DATABASE_URL=postgres://docker@127.0.0.1/elevatorsYoucouldtype:$ createdb -U docker -h 127.0.0.1 elevators
createdb elevatorsOr withPostDoc:$ phd createdb
createdb -U docker -h 127.0.0.1 elevators
createdb elevatorsDocker doesn’t really have anything to do with this. But now that I’ve been
using Docker to manage my Postgres databases, I can’t use defaults anymore.But wait, there’s more!You can do MySQL stuff too:$ phd mysql
mysql -u docker -h 127.0.0.1 --database elevators
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

$ phd mysqlcheck --auto-repair
mysqlcheck -u docker -h 127.0.0.1 elevators --auto-repairIf your database url isn’tDATABASE_URL, you can connect to it by making it
the first argument:$ export FATTYBASE_URL=postgres://fatty@fat/phat
$ phd FATTYBASE_URL psql
psql -U fatty -h fat phatInstallationInstall with pip:pip install postdocExtrasAdd the flag–postdoc-dry-runto just print the command.Add the flag–postdoc-quietto execute the command without printing the
debugging line.Aliases:alias dphd="phd --postdoc-dry-run"
alias qphd="phd --postdoc-quiet"
Package: posted
postedInterfacing with message-broker functionalityTo install:pip install postedExamplesReactiveScopeA scope that reacts to writes by computing associated functions, themselves writing in the scope, creating a chain reaction that propagates information through the scope.Parametersfunc_nodes : Iterable[ReactiveFuncNode]
The functions that will be called when the scope is written to.
scope_factory : Callable[[], MutableMapping]
A factory that returns a new scope. The scope will be cleared by calling this
factory at each call to.clear().ExamplesFirst, we need some func nodes to define the reaction relationships.
We'll stuff these func nodes in a DAG, for ease of use, but it's not necessary.>>>frommeshedimportFuncNode,DAG>>>>>>deff(a,b):...returna+b>>>defg(a_plus_b,d):...returna_plus_b*d>>>f_node=FuncNode(func=f,out='a_plus_b')>>>g_node=FuncNode(func=g,bind={'d':'b'})>>>d=DAG((f_node,g_node))>>>>>>print(d.dot_digraph_ascii())<BLANKLINE>a<BLANKLINE>││▼┌────────┐b──▶│f│└────────┘│││││▼││a_plus_b││││││▼│┌────────┐└─────▶│g_│└────────┘││▼<BLANKLINE>g<BLANKLINE>Now we make a scope with these func nodes.>>>s=ReactiveScope(d)The scope starts empty (by default).>>>s<ReactiveScopewith.scope:{}>So if we try to access any key, we'll get a KeyError.>>>s['g']# doctest: +IGNORE_EXCEPTION_DETAILTraceback(mostrecentcalllast):...KeyError:'g'That's because we didn't put write anything in the scope yet.But, if you giveg_enough data to be able to computeg(namely, if you
write values ofbanda_plus_b), thengwill automatically be computed.>>>s['b']=3>>>s['a_plus_b']=5>>>s<ReactiveScopewith.scope:{'b':3,'a_plus_b':5,'g':15}>So now we can accessg.>>>s['g']15Note though, that we first showed thatgappeared in the scope before we
explicitly asked for it. This was to show thatgwas computed as a
side-effect of writing to the scope, not because we asked for it, triggering the
computationLet's clear the scope and show that by specifyingaandb, we get all the
other values of the network.>>>s.clear()>>>s<ReactiveScopewith.scope:{}>>>>s['a']=3>>>s['b']=4>>>s<ReactiveScopewith.scope:{'a':3,'b':4,'a_plus_b':7,'g':28}>>>>s['g']# (3 + 4) * 4 == 7 * 4 == 2828
Package: poste_replique
Library and command line client to facilitate communication
with anoderepliqueserver.poste_repliquecan be used to do evaluation and completion
of javascript code on a persistent node REPL.The replique server is distributed (along withposte_replique)
as part of the vimnoderepladdon.repliquecan also be installed separately with npm::npm install repliqueCLI UsageYou will need to have a running replique server.
See the replique documentation for more info.To connect with the Python CLI:$ poste_replique.py evaluate '["hello", "world"].join(" ")'
'hello world'All evaluations take place in a persistent environment.It is possible to use a different persistent environment
by specifying a context:$ poste_replique.py evaluate --context CLI-test 'var test = "testing"'
undefined
$ poste_replique.py evaluate --context CLI-test 'test'
'testing'
$ poste_replique.py evaluate 'test'
undefinedNot specifying a context is equivalent to specifying the context “default”.It’s also possible to specify a different host and/or port
using the--serverand--portoptions.API UsageThe API is fairly straightforward.Communication with the server consists of calling thepostfunction.See the source code or the docstrings for more information.An example of usage can be found in the vim addonnoderepl.ProtocolSee the documentation for the replique server (found in thenodereplrepo)
for information on replique’s communication protocol.
Package: posterum
Posterum 📫Simple e-mail address SMTP verification service.FeaturesSMTP-based validationCatch-alltentative verificationEmail service differentiation (e.g., Microsoft, Google, Yahoo, Zoho, etc.)Horizontal scalabilityInstallationDevelopmentMake sure you are running in a virtual environment (e.g.,python3 -m venv .venv)Activate it (e.g.,source .venv/bin/activateor.\.venv\Scripts\Activate.ps1)Install dependencies (we usepip-toolsfor dependency management)Request email validation usingGET http://localhost:8080/v1/addresses/validate?key=123&email=joao@amplemarket.com.Load testingYou can useK6to load-test the API. To do so, you need to install K6 and run the following command:k6run--vus64--iterations5000load/email-local.jsLicensePosterum is currently licensed under theApache License, Version 2.0.Build Automation
Package: poste-sdk
Poste-sdkposte操作助手Poste服务部署生成文档cd docs && make html在线文档安装pip install poste-sdk简要使用fromposte_sdk.clientimportPosteClientfromposte_sdk.clientimportBoxClientfromposte_sdk.modelsimportMailwithPosteClient(address='管理账户',password='密码',domain='域名/ip',verify_ssl=False)asclient:# 初始化box_client=client.init_box_client(email_prefix='test',password='test',domain=None)assertisinstance(box_client,BoxClient)# 获取最近1条邮件mail=box_client.get_latest()assertisinstance(mail,Mail)# email 总数量box_client.get_email_cnt()# 获取指定邮件mail=box_client.get_email(id_=1)assertisinstance(mail,Mail)# 删除邮件box_client.delete_by_id(1)# 清空邮件box_client.drop_mails()
Package: postfind
Find postfix log-entries related to a given Message-IDPostfind takes an email Message-ID and one or more postfix log file names as
input, and searches the logs for mentions of the given Message-ID.  If found,
related log entries are followed as well, until terminated by finding a
queue-id ‘removed’ entry, the end of the log files, or a timeout (if following
a log file).ChangelogVersion 0.2.0 (28 Feb 2018)Added a switch –count to be able to look for more than one bunch of log
lines (to see delivery through mailman, for instance).Changed the output of ‘Looking for …’ so it requires –verboseVersion 0.1.3 (27 Feb 2018)Changed the output of ‘Looking for Message-ID: …’ so it is affected by
the –quiet option.Version 0.1.2 (26 Feb 2018)Flake8 fixes
Package: postfix
postfixA Python package to facilitate writing tests for a testless code base.Installationpip install --upgrade postfixUsageSuppose you have some tremendously complex code, but no tests for that
code. But you are sufficiently convinced, that right now, it's working
as it should. You want to do some refactoring, but you don't dare to do so
without tests (wise decision!). So you decide to write tests a posteriori
to make sure that after refactoring, the code works as before. Let's
suppose that we want
to create tests for the functionmyfuncand the methodMyClass.mymethod(seeexample/state_1). And let's suppose that it is complicated
to get realistic data for the arguments of that function/method. In order
to quickly get a first test coverage with realistic input and output data,
we will usepostfixto create test fixtures. Annotate the function or
method for which you create a fixture with the decoratorpostfix.create_fixture(seeexample/state2) and run your code. Remove the decorators from the production
code, move the dumped fixture files to
your newly created test suite directory and use them to write tests (seeexamples/state_3).LimitationsInpostfixyou cannot instrument methods or functions that are located
in the main module. However, for any nontrivial project with more than
one Python file this should not be a limitation.
Package: postfix-logsums
# postfix-logsums - Postfix log entry summarizerCopyright © 2023 by Frank Brehm <frank@brehm-online.com>, Berlin, Germany## DescriptionPostfix-logsums is a log analyzer/summarizer for the Postfix MTA.It provides both a Python modulepostfix_logsumsas well as the executable
scriptpostfix-logsumsbased on the latter module. The Python module may be
used as an API.This software was inspired by the Perl scriptpflogsumm.plby James S. Seymourhttp://jimsun.linxnet.com/postfix_contrib.html.It is designed to provide an over-view of Postfix activity, with just enough
detail to give the administrator a “heads up” for potential trouble spots.It generates summaries and, if demanded, detailed reports of mail server traffic
ovolumes, rejected and bounced email, and server warnings, errors and panics.## RequirementsThe module and the script are needing Python >= 3.5 without any nono-standard
libraries.## LicenseThis package is licensed by the LGPL 3.
Package: post-from-os
Post Events From OpenseaThis is a package for the sales bots. Below you can find a few examples. Only Twitter is supported currently. Please check out the GitHub for more details.Example Code 1from post_from_os.post_to_twitter_obj import ManageFlowObj

ManageFlowObj('example_file.txt')  # does not print out rare traits in captionExample Code 2from post_from_os.post_to_twitter_obj import ManageFlowObj

ManageFlowObj('example_file.txt', True)  # prints out rare traits in captionHow example_file.txtMUSTlookHashtags
CollectionSlug
TwitterAPIKey
TwitterAPIKeySecret
TwitterAccessToken
TwitterAccessTokenSecret
OpenseaAPIKey
EtherscanAPIKey (OPTIONAL: PictureName)Example file 1#hashtagone #hashtagtwo #hashtagthree ...
boredapeyachtclub
oeir23o4ij2oikew
oweri23-492o3k4l2
o23i495020dm25
23oi4m2moi2eiok2o
430r9fjdsifdklsf
2omm4o234i23m4204940 BoredApeExample file 2#hashtagone #hashtagtwo ...
boredapeyachtclub
oeir23o4ij2oikew
oweri23-492o3k4l2
o23i495020dm25
23oi4m2moi2eiok2o
430r9fjdsifdklsf
2omm4o234i23m4204940
Package: postgis
[![Circle CI](https://img.shields.io/circleci/project/yohanboniface/psycopg-postgis.svg)](https://circleci.com/gh/yohanboniface/psycopg-postgis) [![PyPI](https://img.shields.io/pypi/v/psycopg-postgis.svg)](https://pypi.python.org/pypi/psycopg-postgis) [![PyPI](https://img.shields.io/pypi/pyversions/psycopg-postgis.svg)](https://pypi.python.org/pypi/psycopg-postgis) [![PyPI](https://img.shields.io/pypi/implementation/psycopg-postgis.svg)](https://pypi.python.org/pypi/psycopg-postgis) [![PyPI](https://img.shields.io/pypi/status/psycopg-postgis.svg)](https://pypi.python.org/pypi/psycopg-postgis)# python-postgisPostGIS helpers for psycopg2 and asyncpg.## Installpip install postgisIf you want a compiled version, first install `cython`:pip install cythonpip install postgis## UsageYou need to register the extension:# With psycopg2> from postgis.psycopg import register> register(connection)# With asyncpg> from postgis.asyncpg import register> await register(connection)Then you can pass python geometries instance to psycopg:> cursor.execute('INSERT INTO table (geom) VALUES (%s)', [Point(x=1, y=2, srid=4326)])And retrieve data as python geometries instances:> cursor.execute('SELECT geom FROM points LIMIT 1')> geom = cursor.fetchone()[0]> geom<Point POINT(1.0 2.0)>## Example with psycopg2> import psycopg2> from postgis import LineString> from postgis.psycopg import register> db = psycopg2.connect(dbname="test")> register(db)> cursor.execute('CREATE TABLE IF NOT EXISTS mytable ("geom" geometry(LineString) NOT NULL)')> cursor.execute('INSERT INTO mytable (geom) VALUES (%s)', [LineString([(1, 2), (3, 4)], srid=4326)])> cursor.execute('SELECT geom FROM mytable LIMIT 1')> geom = cursor.fetchone()[0]> geom<LineString LINESTRING(1.0 2.0, 3.0 4.0)>> geom[0]<Point POINT(1.0 2.0)>> geom.coords((1.0, 2.0), (3.0, 4.0))> geom.geojson{'coordinates': ((1.0, 2.0), (3.0, 4.0)), 'type': 'LineString'}> str(geom.geojson)'{"type": "LineString", "coordinates": [[1, 2], [3, 4]]}'## Example with asyncpgfrom postgis.asyncpg import registerpool = await create_pool(**DB_CONFIG, loop=loop, max_size=100,init=register)
Package: postgis2raster
postgis2rasterconverts postgis vector geometry to Gdal RastersEaxmple of FishnetsSingle Band Circlepostgis2raster.analysis_circle(table='mytable',output_raster='myimage.tif',query_x=16.55268272,query_y=40.82717010,radius=2500,cell_size=30)Multi Band Circlepostgis2raster.analysis_circle(table='mytable',output_raster='myimage.tif',query_x=16.55268272,query_y=40.82717010,radius=2500,cell_size=30,classes_to_bands=True)Single Band Polygonpostgis2raster.analysis_polygon(table='mytable',output_raster='myimage.tif',query_x=16.55268272,query_y=40.82717010,height=5000,width=5000,cell_size=30)Multi Band Polygonpostgis2raster.analysis_polygon(table='mytable',output_raster='myimage.tif',query_x=16.55268272,query_y=40.82717010,height=5000,width=5000,cell_size=30,classes_to_bands=True)
Package: postgis-assist
Postgis AssistThepostgis-assistlibrary is build on top ofpsycopg2. It will be really helpful for running the basic postgresql and postgis query in python.Checkout the official documentation of this library here:postgis-assist.readthedocs.io/InstallationFor installation ofpostgis-assist, you need to run following commandpipinstallpostgis-assistExamples using this libraryPlease check the official documentation here:https://postgis-assist.readthedocs.io/.#Library importfrompostgis.pgisimportpgis# Initialization of librarydb=pgis(dbname='pgtest',user='postgres',password='admin',host='localhost',port='5432')# Run any querydb.run_query('SELECT * FROM pg_catalog.pg_tables')# Create schemadb.create_schema(schema_name='schema_name')# Delete schemadb.delete_schema(schema_name='schema_name')# Create Tabledb.create_table(table_name='table_name',schema_name='schema_name',columns='id serial PRIMARY KEY, name varchar(50)')# Get geometry as geojsondb.vector_geojson(schema_name='schema_name',table_name='table_name')# Upload vector file to databasedb.load_vector(vector_path,schema_name="public",table_name="vector")