Saravanan666/pypi-org huggingface dataset:
Package: pretend
Pretend is a library to make stubbing with Python easier.What is stubbing?Stubbing is a technique for writing tests. You may hear the term mixed up with
mocks, fakes, or doubles. Basically a stub is an object that returns pre-canned
responses, rather than doing any computation.Martin Fowler does a good job explaining the terms in hisMocks Aren’t Stubsarticle.How do I installpretend?It’s easy withpip!$pipinstallpretendHow do I usepretend?It’s easy, thestubfunction makes it easy to create a stub:>>>frompretendimportstub>>>x=stub(country_code="US")>>>some_function(x)Herexwill be an object with a single attributecountry_codewhich has
the value"US". Unlike mocks,xwill not respond to any other attribute
or methods, nor does it have any methods for making assertions about what you
accessed.If you want to add a method to the stub, simply provide a function to it:>>>frompretendimportstub>>>x=stub(country_code=lambda:"US")>>>x.country_code()'US'It’s important to note that functions on stubsdo nottake aselfargument, this is because stubs should be returning pre-canned values, not
doing computations.Exceptions withpretendSometimes a method you want to stub doesn’t return a value, but instead raises
an exception. To make this easy,pretendprovides a helper function,raiser, it can be used like so:>>>frompretendimportstub,raiser>>>x=stub(func=raiser(ValueError))>>>x.func()Traceback (most recent call last):File"<stdin>", line1, in<module>File"pretend.py", line74, ininnerraiseexcValueErrorWhy is stubbing better?Ideally stubbing tests how your system responds to a particular input, rather
than which API is used. Stubbing still requires you to write tests that check
the results of a computation, rather than looking for side effects. This
doesn’t always work though, so you do sometimes still need mocking (e.g.
sometimes you really want to check for a side effect.)How do I get my stub into place?If you come from other mocking libraries you’re probably used to apatchmethod to put a mock in place.pretenddoesn’t include anything like this,
a) we believe it’s better, where possible, to pass stubs as arguments rather
than monkey patch them into place, b) we believe that when you do need to
monkey patch something into place you should use something provided by your
testing tool.py.testincludessuch a tool.What if I really need to record the calls?If you really really need to,pretendincludes acall_recorderutility:>>>frompretendimportcall_recorder,call>>>f=call_recorder(lambdaa:a+2)>>>f(3)5>>>assertf.calls==[call(3)]Who wrote this?pretendis by Alex Gaynor, who was just tired of not having a good stubbing
tool for Python. The name is from Idan Gazit.
Package: pretenders-client
An Introduction to PretendersThepretendersproject creates flexible fakes for external network
services. These external services can be faked by setting pre-canned answers,
defining expectations, or just querying them on received data after [test]
execution.They are loosely designed along the pattern of Record/Replay/Verify.Python CompatibilityThe server side of Pretenders is written in Python3:Because we firmly believe all new projects should use Python3, unless
there areverycompelling reasons against it.Because since these will be run as standalone servers, compatibility
is not such an issueIn the cases we implement a client, we will be making this runnable in
Python 3.x and Python 2.6/2.7.Mocked Servers AvailablePretenders currently supports the mocking of HTTP and SMTP servers.Future services we are considering to support include AMQP and ssh.These represent the vast majority of the services that the software we
write interacts with.Some example use cases include:Mocking external HTTP-based APIs at the wire level in module integration
testsFacilitating the manual testing and debugging of front-end Ajax code
where the back-end has not been developed yetWriting fully automated tests for any system that sends email, and
where we want to easily verify outgoing mailsPretenders provides a unified RESTful API to verify the interactions of
our code with external services, regardless of the service protocol.pretenders.client.http - HTTP serverTypical usage is to mock RESTful/SOAP APIs of external services.This will normally require pre-programming the service with responses,
and enquiring the service later about received requests. This can be done
with specialised assertions / matchers, or by setting expectations and
verifying fulfilment of such expectations.The pre-programming step may be done by using specific proprietary HTTP
headers, or by using an alternative HTTP port to the one used for mocking.For example usage see thedocumentation.Implementation is based on thebottleweb microframework.One of our goals will be that the wire protocol is simple enough that you do
not need any specialised client. That said, we will be providing client
libraries (at least one in Python) to simplify interacting with the server,
and to provide a comfortable API to use in tests.Getting HelpFor discussions about the usage, development, and future of pretenders, please
join thepretendersmailing list.DocumentationFull documentation of the project can be found here:http://pretenders.readthedocs.org/ContributingPretenders welcomes contributions in any form - be it pull requests, adding an
issue or feedback viagithubor sending a message on thepretendersmailing list so don’t be shy!We have the following branching convention:master: This should look exactly like the latest release.develop: This is where ongoing work lands, only being merged into master
at release point.In order to contribute, fork the repo ingithuband branch from the develop
branch. Create your PRs into develop in the main repo.Running the testsbuild.shruns the full suite of tests, as well as building the sphinx docs
and checking for pep8 errors.
Package: pretend_extended
An Introduction to PretendersThepretendersproject creates flexible fakes for external network
services. These external services can be faked by setting pre-canned answers,
defining expectations, or just querying them on received data after [test]
execution.They are loosely designed along the pattern of Record/Replay/Verify.Python CompatibilityThe server side of Pretenders is written in Python3:Because we firmly believe all new projects should use Python3, unless
there areverycompelling reasons against it.Because since these will be run as standalone servers, compatibility
is not such an issueIn the cases we implement a client, we will be making this runnable in
Python 3.x and Python 2.6/2.7.Mocked Servers AvailablePretenders currently supports the mocking of HTTP and SMTP servers.Future services we are considering to support include AMQP and ssh.These represent the vast majority of the services that the software we
write interacts with.Some example use cases include:Mocking external HTTP-based APIs at the wire level in module integration
testsFacilitating the manual testing and debugging of front-end Ajax code
where the back-end has not been developed yetWriting fully automated tests for any system that sends email, and
where we want to easily verify outgoing mailsPretenders provides a unified RESTful API to verify the interactions of
our code with external services, regardless of the service protocol.pretenders.client.http - HTTP serverTypical usage is to mock RESTful/SOAP APIs of external services.This will normally require pre-programming the service with responses,
and enquiring the service later about received requests. This can be done
with specialised assertions / matchers, or by setting expectations and
verifying fulfilment of such expectations.The pre-programming step may be done by using specific proprietary HTTP
headers, or by using an alternative HTTP port to the one used for mocking.For example usage see thedocumentation.Implementation is based on thebottleweb microframework.One of our goals will be that the wire protocol is simple enough that you do
not need any specialised client. That said, we will be providing client
libraries (at least one in Python) to simplify interacting with the server,
and to provide a comfortable API to use in tests.Getting HelpFor discussions about the usage, development, and future of pretenders, please
join thepretendersmailing list.DocumentationFull documentation of the project can be found here:http://pretenders.readthedocs.org/ContributingPretenders welcomes contributions in any form - be it pull requests, adding an
issue or feedback viagithubor sending a message on thepretendersmailing list so don’t be shy!We have the following branching convention:master: This should look exactly like the latest release.develop: This is where ongoing work lands, only being merged into master
at release point.In order to contribute, fork the repo ingithuband branch from the develop
branch. Create your PRs into develop in the main repo.Running the testsbuild.shruns the full suite of tests, as well as building the sphinx docs
and checking for pep8 errors.
Package: pretend_extended3
An Introduction to PretendersThepretendersproject creates flexible fakes for external network
services. These external services can be faked by setting pre-canned answers,
defining expectations, or just querying them on received data after [test]
execution.They are loosely designed along the pattern of Record/Replay/Verify.Python CompatibilityThe server side of Pretenders is written in Python3:Because we firmly believe all new projects should use Python3, unless
there areverycompelling reasons against it.Because since these will be run as standalone servers, compatibility
is not such an issueIn the cases we implement a client, we will be making this runnable in
Python 3.x and Python 2.6/2.7.Mocked Servers AvailablePretenders currently supports the mocking of HTTP and SMTP servers.Future services we are considering to support include AMQP and ssh.These represent the vast majority of the services that the software we
write interacts with.Some example use cases include:Mocking external HTTP-based APIs at the wire level in module integration
testsFacilitating the manual testing and debugging of front-end Ajax code
where the back-end has not been developed yetWriting fully automated tests for any system that sends email, and
where we want to easily verify outgoing mailsPretenders provides a unified RESTful API to verify the interactions of
our code with external services, regardless of the service protocol.pretenders.client.http - HTTP serverTypical usage is to mock RESTful/SOAP APIs of external services.This will normally require pre-programming the service with responses,
and enquiring the service later about received requests. This can be done
with specialised assertions / matchers, or by setting expectations and
verifying fulfilment of such expectations.The pre-programming step may be done by using specific proprietary HTTP
headers, or by using an alternative HTTP port to the one used for mocking.For example usage see thedocumentation.Implementation is based on thebottleweb microframework.One of our goals will be that the wire protocol is simple enough that you do
not need any specialised client. That said, we will be providing client
libraries (at least one in Python) to simplify interacting with the server,
and to provide a comfortable API to use in tests.Getting HelpFor discussions about the usage, development, and future of pretenders, please
join thepretendersmailing list.DocumentationFull documentation of the project can be found here:http://pretenders.readthedocs.org/ContributingPretenders welcomes contributions in any form - be it pull requests, adding an
issue or feedback viagithubor sending a message on thepretendersmailing list so don’t be shy!We have the following branching convention:master: This should look exactly like the latest release.develop: This is where ongoing work lands, only being merged into master
at release point.In order to contribute, fork the repo ingithuband branch from the develop
branch. Create your PRs into develop in the main repo.Running the testsbuild.shruns the full suite of tests, as well as building the sphinx docs
and checking for pep8 errors.
Package: pretermgrowth
fenton-growth-calculatorA python package for calculating preterm infant growth statistics.Currently you can calculate z-scores for infants between ages 22w4d-50w0d.frompretermgrowth.fentonimportFentonFenton.calc_zscore(metric="weight",# or "length" or "hc"sex="f",# or "m"gestational_age_in_days=158,# range = [158-350]measure=2400.0# g for weight, cm for length or hc)fenton calculationsFenton TR and Kim JH, BMC Pediatrics 2013, 13:59http://www.ncbi.nlm.nih.gov/pubmed/23601190
Package: pretf-helpers
Helper Classes forpretfDescriptionThis is a set of functions and classes to make usingpretfeasier and "more Pythonic".Installationpipinstallpretf-helpersDocumentation... still a work in progress, but hopefully will soon appear in this repo's Wiki.LicenseThis package is licensed under theMPL 2.0license.Do note that this means (my interpretation):Only files explicitly part of this package must be kept open source.If you addyour ownfiles to this package, you are NOT required to open source those files.If you use this package in your software, you are NOT required to open source your software.Full license text is available in theLICENSEfile.AttributionsThepretfpackage is © 2019 Raymond Butcher
Package: pretix
Reinventing ticket presales, one ticket at a time.Project status & release cycleWhile there is always a lot to do and improve on, pretix by now has been in use for thousands of events
conferences that sold millions of tickets combined. We therefore think of pretix as being stable and ready to use.If you want to use or extend pretix, we strongly recommend to follow ourblog. We will announce all
releases there. You can always find the latest stable version on PyPI or in therelease/X.Ybranch of
this repository. Themasterbranch contains a development version that we also try to keep stable in
the sense that it does not break your data,  but its APIs might change without prior notice.To get started using pretix on your own server, look at theinstallation guidein our documentation.SupportThis project is 100 percent free and open source software. You are welcome to ask questions in the GitHub
repository. Private support via email or phone is only offered to customers of our pretix Hosted or pretix
Enterprise offerings. If you are interested in commercial support, hosting services or supporting this project
financially, please go topretix.euor contact us atsupport@pretix.eu.ContributingIf you want to contribute to pretix, please read thedeveloper documentationin our documentation. If you have any further questions, please do not hesitate to ask!Code of ConductWe have aCode of Conductin place that applies to all project contributions,
including issues, pull requests, etc.LicenseThe code in this repository is covered by different licenses. Most of it is available to everyone under the terms of
the GNU AGPL license v3 with additional terms. See the LICENSE file for the complete license details.
Package: pretix-adyen
This is a plugin forpretix.Development setupMake sure that you have a workingpretix development setup.Clone this repository, eg tolocal/pretix-adyen.Activate the virtual environment you use for pretix development.Executepip install-e.within this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.LicenseCopyright 2020 Raphael MichelReleased under the terms of the Apache License 2.0
Package: pretix-automated-orders
This is a plugin forpretix.Plugin for Pretix software that allows automated orders.Given an event product and a list of emails, sends orders of that product to those emails.
(Good for sending free tickets or free products to customers.)This Pretix plugin uses Celery, Redis and e-mail servers. Before you work on it, make sure you have a basic understanding of these tools.How-to-UseInstall the plugin using pip.
In your event, go to the left settings tab and select plugins. Inside choose the “Pretix Automated Orders” plugin.BuildTo build this plugin, run:make build(NOTE: Make sure you have the correct version set in setup.cfg and the __init__.py file inside the plugin Django app folder.)This will generate two files in the dist/ folder. You can use either to install the package using pip.This package will be uploaded to PyPi anyways so it’s available to anyone but you can also copy the .whl file to your Pretix installation and install it using pip.TranslationsRundjango-admin makemessages -l lang_codeto generate the translations file. After that use any translation software to translate using the .mo/.po files.After the translations, run:django-admin compilemessages -llang_code(Run both commands inside the plugin app folder.)DevelopmentFor development on this plugin, you can follow the documentation for plugin development provided on the Pretix documentation at their website.There is an issue where Celery can’t load the Pretix settings correctly when in development mode due to the way Pretix dynamically loads them using a .cfg file.To bypass these problems, you can force the settings by editing the settings.py file inside the src/ directory of your Pretix development environment.Pretix provides the Celery app in as src/pretix/celery_app.py.In production, there shouldn’t be any problem. Just install the plugin.Development setup (Pretix)Make sure that you have a working pretix development setup.Clone this repository.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed:pip install flake8 isort black docformatterTo check your plugin for rule violations, run:docformatter --check -r .
black --check .
isort -c .
flake8 .You can auto-fix some of these issues by running:docformatter -r .
isort .
black .To automatically check for these issues before you commit, you can run.install-hooks.LicenseCopyright 2023 João Pires, EvolutioReleased under the terms of the Apache License 2.0
Package: pretix-bambora-payform
This is a plugin forpretix.Payment plugin for Visma PayDevelopment setupMake sure that you have a workingpretix development setup.Clone this repository, eg tolocal/pretix-bambora-payform.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.LicenseCopyright 2020 Jaakko Rinta-FilppulaReleased under the terms of the Apache License 2.0
Package: pretix-banktool
This is a command-line tool forpretixthat allows you to automatically query your bank account and sync
transaction data to a pretix server. This uses an API provided by pretix version 1.5 or newer.Current limitations:Currently limited to banks implementing the FinTS protocol (formerly HBCI), which is mostly availabile with Germany
banks.Only supports PIN/TAN authentication, no chip cards.Currently only supports uploading bank transactions on a per-organizer level, not on a per-event level.Currently, this tool stores your banking PIN in plain text on disk or ask you any time. We advise you to use a
read-only banking login or strong two-factor-auth for transactions. We will add support for system keyrings at a
later point in time.Installation and usageFirst, make sure you have a recent Python installation on your system. Ifpython-Vgives you a version 2.x,
try usingpython3instead or install a newer Python. We recommend Python 3.6+, but 3.4+ should work as well.Then, we recommend creating a virtual environment to isolate the python dependencies of this package from other
python programs ony our system:$ pyvenv env
$ source env/bin/activateYou should now see a(env)prepended to your shell prompt. You have to do this
in every shell you use to work with pretix (or configure your shell to do so
automatically). Depending on your Python version, you might need to replacepyvenvwithpython-mvenv.
If you are working on Ubuntu or Debian, we recommend upgrading your pip and setuptools installation inside
the virtual environment:(env)$ pip3 install -U pip setuptoolsNow you can install the bank tool:(env)$ pip3 install pretix-banktoolTo configure it, run the following command:(env)$ pretix-banktool setupYou will be asked a number of questions on your online banking access as well as for the URL of your pretix
installation and your API key. The prompt will also tell you how to obtain that API key.At the end, this command will write a config file to a location of your choice. You need to specify this config file
for all further actions. The command:(env)$ pretix-banktool test configfile-path.cfgwill test both the connection to the bank as well as the connection to pretix, but will not perform any actions. To
actually upload data, use:(env)$ pretix-banktool upload --days 30 configfile-path.cfgThe--daysoption specifies the timeframe of transaction to fetch from the bank. If you omit it, the tool will
fetch the last 30 days.Go to the “Import bank data” tab of the organizer settings in pretix to view any transactions that could not be
automatically assigned to a ticket order.ContributingIf you like to contribute to this project, you are very welcome to do so. If you have any
questions in the process, please do not hesitate to ask us.Please note that we have aCode of Conductin place that applies to all project contributions, including issues,
pull requests, etc.LicenseCopyright 2017 Raphael MichelReleased under the terms of the GNU General Public License v3.0.
Package: pretix-banktransferfi
This is a plugin forpretix.This plugin generates a reference code/number (viitenumero) compliant with Finnish banks.Development setupMake sure that you have a workingpretix development setup.Clone this repository, eg tolocal/pretix-banktransfer-fi.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.LicenseCopyright 2018 Felipe MoratoReleased under the terms of the Apache License 2.0
Package: pretix-banktransfer-fi
This is a plugin forpretix.This plugin generates a reference code/number (viitenumero) compliant with Finnish banks.Development setupMake sure that you have a workingpretix development setup.Clone this repository, eg tolocal/pretix-banktransfer-fi.Activate the virtual environment you use for pretix development.Executepython setup.py developwithin this directory to register this application with pretix’s plugin registry.Executemakewithin this directory to compile translations.Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in
the ‘plugins’ tab in the settings.LicenseCopyright 2018 Felipe MoratoReleased under the terms of the Apache License 2.0