Saravanan666/pypi-org huggingface dataset:
Package: enturclient
Entur API clientPython client for fetching estimated departures from stop places in Norway fromentur.orgAPI. Information about stop places, platforms and real-time departures.UsageimportaiohttpimportasynciofromenturclientimportEnturPublicTransportDataAPI_CLIENT_ID='awesome_company - my_application'asyncdefprint_bergen_train_delay():asyncwithaiohttp.ClientSession()asclient:stops=['NSR:StopPlace:548']quays=['NSR:Quay:48550']data=EnturPublicTransportData(client_name=API_CLIENT_ID,# Requiredstops=stops,quays=quays,omit_non_boarding=True,number_of_departures=5,web_session=client)# recommended argumentawaitdata.update()bergen_train=data.get_stop_info('NSR:StopPlace:548')bergen_train_delay=bergen_train.estimated_calls[0].delay_in_minprint(bergen_train_delay)asyncio.run(print_bergen_train_delay())Obtaining a stop idEntur's travel planerhas a map of all stops used in Norway. Use the map to find the stops you're interested in. When you have found one of your stops, click on it, and hit "Se alle avganger".Now the web browser should contain an URL with the id in it. Such as this:https://en-tur.no/nearby-stop-place-detail?id=NSR:StopPlace:32376The stop id is the content afterid=parameter in the url. Copy paste this into the configuration.It's also possible to use theNational Stop Register (NSR).
Find your stop in the map, click on it and then again at the name. You have to zoom quite a bit in before the stops shows in the map. Information about the stop place, including the stop and quay ids will pop up on the side.
Package: entweet
Everyone likes Twitter, right? We all think it’s awesome.However, Twitter suffers from one critical problem: it lacks GPG integration.
In this modern era, we believe it’s vital to wed the two most important
technologies of our generation: message integrity, and 140-character
witticisms.Enter Entweet.Entweet is a tool for taking Twitter and making it 100 times nerdier. No longer
will you have to be content with tweeting in plaintext, like your
non-tech-savvy uncle, Barry. Instead, you can take your Twitter conversations
to the next level, by guaranteeing the integrity of everything you tweet, while
making itreally inconvenientfor other people to read your messages.How Do I Use It?Simple. First, install Entweet from the Python Package Index. You can trust it,
it’s over TLS.pip install entweetMake sure you have GPG installed, or obviously nothing will work. If you don’t
have GPG installed, then don’t worry: GPG isfamously easy to use, so easy
that we won’t explain it here.Next, populate some environment variables. For your security and convenience,
Entweet does not link to a built-in Twitter application. You’ll want to create
one for yourself, then generate yourself an application key.Once you have your four Twitter IDs, put them in environment variables, calledENTWEET_CLIENT_KEY,ENTWEET_CLIENT_SECRET,ENTWEET_RESOURCE_OWNER_KEY, andENTWEET_RESOURCE_OWNER_SECRET.Now you’re ready to go, it’s easy. To sign a tweet, just runentweet signEnter your tweet at the prompt, and then enter your GPG passphrase.Entweet will sign the message, and then post a tweet containing your signed
message. That’s it!If you’ve seen a tweet produced by Entweet and want to read it, it’s also
really easy. Find the tweet ID (from the URL for the tweet, for example), and
then runentweet decrypt <message_id>The message will be printed to the screen, along with the ID of the person who
signed it. If the signature doesn’t check out, Entweet will error out, and
you’ll know the NSA is watching you and your friends. In this eventuality,
please contact your local governmental representative for next steps.AuthorsDavid Gouldin and Cory Benfield.Thisawesomeidea is the product of DjangoCon EU, with the core idea makers
being Andrey Petrov, David Gouldin, Cory Benfield, Kristian Glass,
Peter Inglesby, and George Hickman. Don’t blame them, this isn’t their fault.
Except Andrey, he came up with the image recognition stuff. Blame him.
Package: entwine
ContentsInstallationSummaryChangesRequirementsInstallationYou can install entwine witheasy_install entwineor install from thesubversion
repositorywitheasy_installentwine==dev.Summaryentwine is a command-line client for accessing information from twine.com
It is just a beginning and very bare-bones, due to the fact that there really is no public API yet ;)Usage Examples:$ entwine -p <username>
     List a user's Twine profile.

$ entwine --raw -p <username>
     List a user's Twine profile in raw RDF.Changes0.0.2: Initial RDF support using rdflib0.0.1: Initial release.RequirementssetuptoolsConfigObjrdflib
Package: entx-py
EntX-Py - Encrypt and Decrypt your python files!EntXpy allows you to encrypt and decrypt your python files with the EntX library, with encrypted files requiring a password to run/decrypt. All encrypted files have the extension .entxpy.The FileClient objectTo perform operations on a file, you must initialise a FileClient object, with the file path and the password you wish to use.from entxpy import FileClient

path = "path to .py / .entxpy file"
password = "your password"

my_client = FileClient(password, path)Encrypting a .py filefrom entxpy import FileClient

path = "path to .py/ file"
password = "your password"

my_client = FileClient(password, path)

my_client.pack()Decrypting a .entxpy filefrom entxpy import FileClient

path = "path to entxpy file"
password = "your password"

my_client = FileClient(password, path)

my_client.unpack()Running a .py / .entxpy filefrom entxpy import FileClient

path = "path to .py / .entxpy file"
password = "your password"

my_client = FileClient(password, path)

my_client.run()Exceptions:entxpy.errors.InvalidPathRaised when the path provided does not lead to a valid fileentxpy.errors.InvalidOperationRaised when an operation is being performed on an incorrect file, i.e running FileClient.unpack() on a .py file.
Package: entyty
entytyentytyis a Python module that defines a framework for managing entities in a game or simulation environment. Entities are objects that can exist on a grid, occupy cells, and perform various actions within the system. The module provides base classes for creating and managing entities in a game or simulation. It also includes a set of subclasses that extend the framework to support grid-based entities. The module relies on thepygletlibrary for event dispatching/handling.Package StructureThe "entyty" package consists of the following classes:'_AbstractEntity''_BaseEntity''Entity''LogicalEntity''VisualEntity''_AbstractGridEntity''GridEntity'EntitiesEntityEntityis a subclass ofBaseEntityrepresenting general entities.LogicalEntityLogicalEntityis a subclass ofBaseEntityrepresenting logical entities.VisualEntityVisualEntityis a subclass ofBaseEntityrepresenting visual entities.It includes additional properties for managing an element and a position.GridEntityGridEntityis a concrete subclass ofAbstractGridEntity.It represents grid-based entities and includes methods and properties for managing their movement and actions.Grid entities can occupy cells, move on a grid, and perform actions.UsageTo use the "entyty" package, you can create subclasses of the provided base classes to define specific entity types in your game or simulation. Customize the properties and methods to suit your needs.Here's a simple example of how to create an entity:fromentytyimportLogicalEntityclassMyEntity(LogicalEntity):def__init__(self):super().__init__(name='MyEntity',**kwargs)my_entity=MyEntity()
Package: enular
Enular Librarypip install enularNOTE: Alpha version (v1.0.0) and development in progress. Expect beta release in late 2023.The Enular Library contains tools for backtesting, evaluating and visualising algorithmic trading strategies. It allows the user to easily combine indicators with complex operations into strategies, similar to neural networks. It also provides indicators, data sources, and paper trading capabilities. Documentation coming soon. Enular.comDetails:Uses parts of Backtrader's Cerebro engine with fixes from Backtrader2Data streaming from Yahoo FinanceIndicator and strategy collectionImprove accessiblity with simplified architectureHighly scalable strategies: extend classes and redefine trade logicLive trading capabilitiesArchitecture:1 category of base indicators (INPUT: market data, OUTPUT: single indicator signal)Indicator library with existing technical analysis indicators3 categories of indicator operations (INPUT: two indicator signals, OUTPUT: single indicator signal):Scalar inputs to scalar outputScalar inputs to boolean outputBoolean inputs to boolean output (7 basic logic gates)2 categories of strategy operations (INPUT two indicator signals, OUTPUT: order instructions):Scalar inputs to order instructionsBoolean inputs to order instructions (7 basic logic gates)Development in progress:Live trading via IBIndicator libraryStrategy libraryData feed improvementsMachine learning capabitiesInstructional articles on MediumTemplatesDocumentationUser forumResaerchData hosting and supply
Package: enum
ImportantSuperseded by Python standard library.Python 3 now has in its standard library anenumimplementation (also available for older Python versions as
the third-partyenum34distribution) that supersedes this
library.This package provides a module for robust enumerations in Python.An enumeration object is created with a sequence of string arguments
to the Enum() constructor:>>> from enum import Enum
>>> Colours = Enum('red', 'blue', 'green')
>>> Weekdays = Enum('mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun')The return value is an immutable sequence object with a value for each
of the string arguments. Each value is also available as an attribute
named from the corresponding string argument:>>> pizza_night = Weekdays[4]
>>> shirt_colour = Colours.greenThe values are constants that can be compared only with values from
the same enumeration; comparison with other values will invoke
Python’s fallback comparisons:>>> pizza_night == Weekdays.fri
True
>>> shirt_colour > Colours.red
True
>>> shirt_colour == "green"
FalseEach value from an enumeration exports its sequence index
as an integer, and can be coerced to a simple string matching the
original arguments used to create the enumeration:>>> str(pizza_night)
'fri'
>>> shirt_colour.index
2
Package: enum34
An enumeration is a set of symbolic names (members) bound to unique, constant
values.  Within an enumeration, the members can be compared by identity, and
the enumeration itself can be iterated over.from enum import Enumclass Fruit(Enum):apple = 1
banana = 2
orange = 3list(Fruit)
# [<Fruit.apple: 1>, <Fruit.banana: 2>, <Fruit.orange: 3>]len(Fruit)
# 3Fruit.banana
# <Fruit.banana: 2>Fruit[‘banana’]
# <Fruit.banana: 2>Fruit(2)
# <Fruit.banana: 2>Fruit.banana is Fruit[‘banana’] is Fruit(2)
# TrueFruit.banana.name
# ‘banana’Fruit.banana.value
# 2Repository and Issue Tracker athttps://bitbucket.org/stoneleaf/enum34.
Package: enum3field
A Django 1.7+ model field for use with Python 3 enums.Works with any enum whose values are integers. Subclasses the IntegerField to store the enum as integers in the database.When creating/loading fixtures, values are serialized to dotted names, like “AnimalType.Cat” for the example below.A decorator is needed on Python enums in order to make them work with Django migrations, which require a deconstruct() method on the enum members.Installation:pip install enum3fieldExample:import enum
from enum3field import EnumField, django_enum

@django_enum
class AnimalType(enum.Enum):
  Cat = 1
  Dog = 2
  Turtle = 3

class Animal(models.Model):
  animalType = EnumField(AnimalType)Requires Python 3. Not tested with Django versions prior to 1.7 but might work.
Package: enum4linux.py
enum4linux.pyIntroThis repository tries to port theenum4linuxutility from it's native perl version to python.Perl repohttps://github.com/CiscoCXSecurity/enum4linux.This is supposed to be a python module that you can install viapipand then later use as a CLI utility, just as how we use gunicorn, black etc.Usage$ enum4linux --helpDevelopmentTBDContributorsonlinejudge95
Package: enum-actions
enum-actionsFor easy selection command-line selection of anenum.Enumvariant withargparse.Actions.Use it like this:>>>fromenum_actionsimportenum_action>>>fromargparseimportArgumentParser>>>importenum>>>classMyEnum(enum.Enum):...A=1...B=2>>>parser=ArgumentParser()>>>_=parser.add_argument("-e","--enum",action=enum_action(MyEnum),default="a",help="pick a variant")# create an action for your enum>>>args=parser.parse_args()# there will be an instance of MyEnum in the args objectFeaturesChoices are handled transparentlyfoo.py --help

usage: foo.py [-h] [-e {a,b}]

optional arguments:
  -h, --help            show this help message and exit
  -e {a,b}, --enum {a,b}
                        pick a variant (default: b)Defaults are handled transparentlyHaving a default string or enum will both workparser.add_argument("--enum",action=enum_action(MyEnum),default="a")parser.add_argument("--enum",action=enum_action(MyEnum),default=MyEnum.A)
Package: enumatch
enumatchStrictly match all the possibilities of an enum.Use caseThis littlematchfunction makes matching Python's enum fields safer by forcing
us to match all the possibilities either explicitly or by using a wildcard.Use...(ellipsis) for the wildcard.TIPsAvoid the use of...(wildcard) to make sure any modification to the enums are safe.Create the matcher at compile-time to have compile-time validation and zero runtime cost.Example: Flat matcherfromenumimportEnum,autofromenumatchimportmatchclassSide(Enum):left=auto()right=auto()# Define a simple matchermatcher1=match({Side.left:"Go left",Side.right:"Go right"})assertmatcher1[Side.left]=="Go left"assertmatcher1[Side.right]=="Go right"# Define a matcher with a default casematcher2=match({Side.left:"Go left",...:"Go right"})assertmatcher2[Side.left]=="Go left"assertmatcher2[Side.right]=="Go right"# If all the possibilities are not handled, we get errorwithpytest.raises(ValueError,match="missing possibilities: Side.right"):match({Side.left:"Go left"})Example: Nested matcherfromenumimportEnum,autofromenumatchimportmatch,forallclassSwitch(Enum):on=auto()off=auto()# is_on[main_switch][bedroom_switch]: boolis_on=match({Switch.on:match({Switch.on:True,Switch.off:False}),Switch.off:forall(Switch,False),})assertis_on[Switch.on][Switch.on]==Trueassertis_on[Switch.on][Switch.off]==Falseassertis_on[Switch.off][Switch.on]==Falseassertis_on[Switch.off][Switch.off]==False
Package: enumchoice
Enum Choice for Click (WIP)TODOs: Configuring this templateCreate a Netlify site for your repository, then turn off automatic builds in Netlify settings.Add these CI secrets:PYPI_API_TOKEN,NETLIFY_AUTH_TOKEN(Netlify user settings - personal access tokens),DEV_NETLIFY_SITE_ID,PROD_NETLIFY_SITE_ID(API ID from Netlify site settings)Set up Codecov at TODOOverviewInstallationpipinstallenumchoiceUsageDevelopmentSubmit PRs againstdevelopbranch, then make a release pull request tomaster.# Install requirementspipinstall--upgradepipwheel
pipinstall-rrequirements_dev.txt# Install local packagepipinstall-e.# Install pre-commitpre-commitinstall# Run testsmaketest# Run lintmakelint# bump version before submitting a PR against master (all master commits are deployed)bump2versionpatch# possible: major / minor / patch# also ensure CHANGELOG.md updatedChangelog0.0.1First release on PyPI.
Package: enumerate-all-files-in-folder
A function that enumerates all files in a folder (and subfolders)$pipinstallenumerate-all-files-in-folderOriginalfromenumerate_all_files_in_folderimportcopy_enumerate_filesalli=copy_enumerate_files(folders=[r"F:\flattest"],outputfolder=r"F:\flattestresult1",maxsubdirs=0,groupsuffix=True,restart_index_new_suffix=True,zfill=8,prefix='1test_')alli=copy_enumerate_files(folders=[r"F:\flattest"],outputfolder=r"F:\flattestresult2",maxsubdirs=0,groupsuffix=False,restart_index_new_suffix=False,zfill=8,prefix='2test_')alli=copy_enumerate_files(folders=[r"F:\flattest"],outputfolder=r"F:\flattestresult3",maxsubdirs=0,groupsuffix=True,restart_index_new_suffix=False,zfill=8,prefix='3test_')
Package: enumerate-markdown
1. Enumerates the headers in a markdown fileEnumerate headers in markdown file.1.1 Usage:Run from the command linemarkdown-enuminputFile.mdoutputFile.mdThe script will parsesomeFile.md, add an enumeration to each header and output
the result to the file namedoutputFile.md.
All previously existing headers will be overriden. So a useful scenario ismarkdown-enuminputFile.mdinputFile.md1.2 Install:Requires python 3.pipinstallenumerate-markdown1.3 Assumed markdown syntax:The markdown syntax assumed is the one used by mistune, called "Sane CommonMark"https://mistune.readthedocs.io/en/latest/intro.html#sane-commonmarkBut, with a fine twist: headings defined by a single-or single=are considered too.  For example:This is a heading-This is also a heading=
Package: enumerate_skip
This package provides 2 iterators,enumerate_skipandenumerate_manual, that
extend the behaviour of the standard librariesenumeratea bit.enumerate_skiphas been extended with askipmethod that makes sure the nextindexyielded is the same as the current one. The wordskipmight not make
sense at first, but this function was written because I needed to not handle
some values yielded by an iterator, like:for index, obj in enumerate(...):
    if obj.has_some_attr():
        continue
    # do something with object and index hereIfindexin that example was printed to the user (or something similar), there
would be gaps. Usingenumerate_skipinstead, the above example could be
written as:it = enumerate_skip(...)
for index, obj in it:
    if obj.has_some_attr():
        it.skip()
        continue
    # do something with object and index hereenumerate_manualworks the other way around: you have to manually calladvanceon it to increment theindex:it = enumerate_manual(...)
for index, obj in it:
    if obj.has_some_attr():
        continue
    # do something with object and index here
    it.advance()
Package: enumeratime
Einfaches Programm, um sich in Schleifen eine Prozent und Zeitprognose
auszugeben. Gibt pro Schleifendurchlauf die Zeilennummer zurück, kann
also auch enumerate ersetzen.Der Leser kennt vermutlich das Gefühl, wenn man etwas bei Python
verarbeitet und esdauert, und dauert,” und dauert,”*100Mit diesem
Programm kann man eine einfache Zeitprognose bekommen, sofern man über
Objekte mit bekannter Länge iteriert, bei denen die Verarbeitung der
einzelnen Elemente etwa gleich lange dauert. Bald vielleicht auch noch
in “Forschrittsbalken-Version”fromenumeratimeimportEnumeraTIMEforn,lineinEnumeraTime(myobject)):doSomething(myobject)Hinweis: Die Software ist unter GPL3.0 lizensiert, allerdings in nur 15
Minuten entstanden, um abschätzen zu können, ob die Verarbeitung
innerhalb der nächsten Stunde fertig wird.
Package: enum-extend
Python enum-extended moduleEnum Extend classes.DocsRead the docshereInstallPIPpipinstallenum-extendEnumComparableEnumComparable class is designed for comparsion of Integer based enums.Allows child classes to be compared using the following comparsion operaters.==,!=,<,<=,>,>=,+,+=,-, and-=.AutoEnumAutoEnum class is a child class of EnumComparable.Allows child classed to be auto numbered with Docstring.
Package: enum-extension
Enum Extensionenum-extension is a Python library that extends the functionality of the built-in enum module,
offering an array of additional features and utilities to simplify enumeration handling and expand its capabilities.InstallationYou can install enum-extension using pip:pip install enum-extensionDescriptionThe enum-extension library enhances the native enum module in Python, providing additional functionality for enumerations.
It introduces the StringEnum class, which inherits from the standard enum.Enum and extends its capabilities.
With enum-extension, you can perform bitwise operations such as OR, AND, and NOT on string type enum values,
combine multiple enums into a single variable, and easily check for membership within combined enums.UsageHere are some examples of how to use StringEnum:fromenum_extensionsimportStringEnum# Create an enum by inheriting from StringEnumclassPaymentMethod(StringEnum):VISA="VISA"MASTERCARD="MASTERCARD"APPLE_PAY="APPLE_PAY"GOOGLE_PAY="GOOGLE_PAY"VENMO="VENMO"PAYPAL="PAYPAL"# Use | to combine two enums into oneCARDS=PaymentMethod.MASTERCARD|PaymentMethod.VISA# PaymentMethod.MASTERCARD|VISA# Use ~ to get the opposite values of an enumWALLETS=~CARDS# PaymentMethod.APPLE_PAY|GOOGLE_PAY|PAYPAL|VENMO# Use & operator to check for membership of an enum in the combined enumPaymentMethod.MASTERCARD&CARDS# TruePaymentMethod.VISA&CARDS# TruePaymentMethod.VENMO&CARDS# False# Check membership using a string value with & operator (case-insensitive)CARDS&"Visa"# TrueCARDS&"visa"# True# Check string with enum value as a comparisonPaymentMethod.VISA&"visa"# TruePaymentMethod.PAYPAL&"VISA"# False# Use comparison operator to check for equalityPaymentMethod.VISA=="visa"# TruePaymentMethod.PAYPAL=="VISA"# Falsepaypal1=PaymentMethod.PAYPALpaypal2=PaymentMethod.PAYPALpaypal1==paypal2# True# Create multiple enum classes and merge their valuesclassCardProvider(StringEnum):VISA="VISA"MASTERCARD="MASTERCARD"classWalletProvider(StringEnum):VENMO="VENMO"PAYPAL="PAYPAL"CARD_PROVIDERS=CardProvider.MASTERCARD|CardProvider.VISA# CardProvider.MASTERCARD|VISAWALLET_PROVIDERS=WalletProvider.VENMO|WalletProvider.PAYPAL# WalletProvider.PAYPAL|VENMO# Merge two separate StringEnum class valuesALL_METHODS=CARD_PROVIDERS|WALLET_PROVIDERS# CardProvider_WalletProvider.MASTERCARD|PAYPAL|VENMO|VISA# Check for membership with the merged enumWalletProvider.VENMO&WALLET_PROVIDERS# TrueCardProvider.MASTERCARD&ALL_METHODS# True# Please note that the merge and combine operations do not modify the original enum definitions but create new enum values.If you have any suggestions or feature requests, please feel free to contribute or reach out.LicenseThis project is licensed under the MIT License - see the LICENSE file for details.Hope you find enum-extension helpful and convenient for working with enumerations in Python.If you encounter any issues or have any questions, please don't hesitate to open an issue onGitHub.This package is owned and maintained bym-ali-ubit.
Package: enumhandler
EnumHandlerIf you're like me, you were disappointed to see that structural pattern matching (PEP 622) landed in Python without any of the proposed exhaustiveness guarantees (PEP 634).
Althoughmatchandcaseare still useful, exhaustive matching over an enum is a comfortable idiom in other languages, and I was looking forward to first-class treatment of this in Python.
Worse, I ended up writing a number of repetitive exhaustiveness tests:importpytestfrommyprojectimportColors,name_of_color@pytest.parametrize(MyEnum)deftest_name_of_color_exhaustiveness(value):assertname_of_color(value)Tests that don't care about the return value of the function under test are a hallmark of type system failures.This library fixes that by providing a base class for classes that exhaustively cover an enumeration.
Upon class definition,EnumHandlerwill validate the exhaustiveness and uniqueness of handlers registered on any subclass using theEnumHandler.registerdecorator.fromenumimportEnum,autofromenumhandlerimportEnumHandler,handlesclassColors(Enum):RED=auto()GREEN=auto()BLUE=auto()classNameOfColor(EnumHandler,enum=Colors):@handles(Colors.RED)defred(self)->str:return"Red"@handles(Colors.GREEN)defgreen(self)->str:return"Green"@handles(Colors.BLUE)defblue(self)->str:return"Blue"The class is instantiated with a member of the enum, and the resulting instance is callable:>>>print(NameOfColor(Colors.RED)())RedAnInvalidEnumHandlerexception is raised in three cases:Not all enum values are handled.One enum value has multiple registered handlers.A handler is registered for the incorrect enum.A handler is registered on an existing class.Please note that subclassing is currently not supported.