Saravanan666/pypi-org huggingface dataset:
Package: eventsourcing-mongodb
Event Sourcing in Python with MongoDBThis is an extension package for the Pythoneventsourcinglibrary
that provides a persistence module forMongoDB.InstallationUse pip to install thestable distributionfrom the Python Package Index. Please note, it is recommended to
install Python packages into a Python virtual environment.$ pip install eventsourcing-mongodbGetting startedDefine Aggregates and Applications the usual way. Please refer to theEventsourcing Documentationfor more detailed examples.fromeventsourcing.domainimportAggregate,eventfromeventsourcing.applicationimportApplicationfromuuidimportUUIDclassDog(Aggregate):@event('Registered')def__init__(self,name:str):self.name=nameself.tricks=[]@event('TrickAdded')defadd_trick(self,trick:str):self.tricks.append(trick)classDogSchool(Application):defregister_dog(self,name:str)->UUID:dog=Dog(name)self.save(dog)returndog.iddefadd_trick(self,dog_id:UUID,trick:str):dog=self.repository.get(dog_id)dog.add_trick(trick)self.save(dog)defget_dog(self,dog_id:UUID)->dict:dog=self.repository.get(dog_id)return{'id':dog.id,'name':dog.name,'tricks':dog.tricks}To configure your Application for using MongoDB for persistence, you need to set the environment variablePERSISTENCE_MODULEto'eventsourcing_mongodb'.
Furthermore, you need to set the environment variablesMONGO_CONNECTION_STRINGandMONGO_DB_NAME.
Please refer to theMongoDB Documentationto learn more about connection strings. You can read more about the available variableshere.importosos.environ['PERSISTENCE_MODULE']='eventsourcing_mongodb'os.environ['MONGO_CONNECTION_STRING']='mongodb://localhost'os.environ['MONGO_DB_NAME']='EventSourcing'Instead of setting the variables on environment level, you can also set them on application level.classDogSchool(Application):env={'PERSISTENCE_MODULE':'eventsourcing_mongodb','MONGO_CONNECTION_STRING':'mongodb://localhost','MONGO_DB_NAME':'EventSourcing',...}...Construct and use the application in the usual way.dog_school=DogSchool()dog_id=dog_school.register_dog('Fido')dog_school.add_trick(dog_id,'roll over')dog=dog_school.get_dog(dog_id)print(dog)# {'id': UUID('...'), 'name': 'Fido', 'tricks': ['roll over']}And retrieve the data later:dog_school=DogSchool()dog_id=UUID('...')dog=dog_school.get_dog(dog_id)print(dog)# {'id': UUID('...'), 'name': 'Fido', 'tricks': ['roll over']}Available Environment VariablesYou can use the following variables to configure mongodb persistence:VariableType / Possible valuesRequiredDescriptionPERSISTENCE_MODULE'eventsourcing_mongodb'trueconfigures the application to use this module for persistence.MONGO_CONNECTION_STRINGstringtrueMongoDB Connection String. Please refer to theMongoDB Documentationto learn more about connection strings.MONGO_DB_NAMEstringtrueName of the Database the data sould be stored inMONGO_COL_PREFIXstringfalsePrefix for the MongoDB Collections for events, snapshots and trackings. The default is an empty String.
Package: events-protocol
events-protocolComo usarClientAs informações essenciais para enviar o evento são:url,name,versionepayload.Apenas com estas informações já é possivel enviar um evento.from events_protocol.client import EventClient

# Instancia o client
client = EventClient(url="http://example.com/events/")

# Exemplo passando apenas as informações essenciais
response = client.send_event(
	name="event:example",
	version=1,
	payload={
		"example": "example"
	},
)

# Exemplo passando todas as informações
response = client.send_event(
	name="event:example",
	version=1,
	id="9230c47c-3bcf-11ea-b77f-2e728ce88125",
	flow_id="a47830ca-3bcf-11ea-a232-2e728ce88125",
	payload={
		"example": "example"
	},
	identity={
		"userId": "USER_ID",
	},
	metadata={
		"date": "00-00-0000",
	},
	timeout=1000,
)ServerUm server é composto porhandler,registereEventSchema.Abaixo se encontra um exemplo de utilização.from events_protocol.server.handler.event_handler_registry import EventRegister
from events_protocol.core.builder import EventBuilder, Event
from events_protocol.core.model.base import CamelPydanticMixin
from events_protocol.core.model.event import Event, ResponseEvent
from events_protocol.server.handler.event_handler import EventHandler
from events_protocol.server.parser.event_processor import EventProcessor


class MyEventSchema(CamelPydanticMixin):
    example: str


class MyHandler(EventHandler):
    _SCHEMA = MyEventSchema

    @classmethod
    def handle(cls, event: Event) -> ResponseEvent:
        payload = cls.parse_event(event)
        response = {"MyEventPayload": payload.example}
        return EventBuilder.response_for(event, response)


class MyEventRegister(EventRegister):
    event_name = "get:event:example"
    event_version = 1
    event_handler = MyHandler


MyEventRegister.register_event()

event_input = Event(
    name="get:event:example",
    version=1,
    id="9230c47c-3bcf-11ea-b77f-2e728ce88125",
    flow_id="a47830ca-3bcf-11ea-a232-2e728ce88125",
    payload={"example": "example"},
    identity={"userId": "USER_ID",},
    metadata={"date": "00-00-0000",},
)
input_body = event_input.to_json()

## Apos todos eventos registrados, registre uma rota "/events" no seu framework web de preferência e processe o body utilizando o seguinte comando
response = EventProcessor.process_event(input_body)
Package: eventspy
EventsPyEvents in PythonExample:fromthreadingimportThreadimporteventspyevents=eventspy.EventsHandler()@events.on('message')defmessageEvent(data):print(f"{data['name']}>{data['message']}")@events.on("quit")defquitEvent(data):print(f"{data['name']}> quit!")exit()defterminal():whileTrue:cmd=input("> ")ifcmd=="quit":events.send("quit",{"name":"Nawaf"})else:events.send("message",{"name":"Nawaf","message":cmd})thread=Thread(target=terminal,daemon=True)thread.start()events.listen()
Package: events-sdk-python
Events SDK PythonInstallationInstallevents-sdk-pythonusing pip:python-mpipinstallevents-sdk-pythonUsageBy default, you do not need to manually instantiate the client. Simply set your key and start calling methods.importhightouch.hteventsashteventshtevents.write_key='YOUR_WRITE_KEY'htevents.identify('userId1',{'email':'bat@example.com','name':'Person People',})htevents.track('userId1','Order Completed',{})NoteIf you need to send data to multiple Hightouch sources, you can initialize one new Client perwrite_key.fromhightouch.htevents.clientimportClienthtevents.write_key='YOUR_WRITE_KEY'other_htevents=Client('<OTHER_WRITE_KEY>')htevents.identify('userId1',{'email':'bat@example.com','name':'Person People',})other_htevents.identify('userId1',{'email':'bat@example.com','name':'Person People',})htevents.track('userId1','Order Completed',{})other_htevents.track('userId1','Order Completed',{})NoteOnly instantiateClientclassonceper write key, per application.fromflaskimportFlaskfromhightouch.htevents.clientimportClientapp=Flask(__name__)//Forexample,inflask,instantiatetheclientoutsideoftherequesthandlershtevents=Client('<WRITE_KEY>')@app.route('/')defhello_world():htevents.track('userId1','hello',{})return'Hello World'
Package: events-system
Events SystemEventsSystemA singleton based thread-safe event system, which components can use to subscribe and post to other components.install:pip install events-systemimport:import EventsSystemimportEventListener:from events_system.event_listener import EventListenersubscribe:EventsSystem.subscribe("event_type", function)post:EventsSystem.post(event_type)example use: Create an abstract class as listener to a concrete component by subclassingEventListenerand defining an abstract function along the lines ofsetup_ConcreteComponent_listener. In its abstract function, this component listener must callsuper().setup_event_handlers()to which the subscription dictionary{"event_type":function}is passed. Whatever other component needs to be informed about these events, can now implement that component listener and pass their subscription dictionary to the function.
Package: event-statemachine
Event State MachineA simple event driven state machineFree software: MIT licenseDocumentation:https://event-statemachine.readthedocs.io.Welcome to Event StateMachine. I always struggled to find a simple statemachine that could be used in a python project. So I decided to create my own, it’s simple but useful.
The desing is based on transitions more than states, so you can define a transition from a state to another and the event that triggers it.Getting startedTo install Event StateMachine, run this command in your terminal:$pipinstallevent_statemachineLet’s implement this simple turnstile example:Define your state machine:fromevent_statemachineimportStateMachinefromevent_statemachineimporttransitionfromevent_statemachineimportevent_conditionclassTurnstile(StateMachine):@transition("Locked -> Unlocked")@event_condition(lambdaself:self.evt.get("action")=="coin"andself.evt.get("coin")=="valid")defon_coin(self):print("Unlocking turnstile")@transition("Locked -> Locked")@event_condition(lambdaself:self.evt.get("action")=="coin"andself.evt.get("coin")=="invalid")defon_coin_invalid(self):print("Invalid coin, try again")@transition("Unlocked -> Unlocked")@event_condition(lambdaself:self.evt.get("action")=="coin")defon_unlocked_coin(self):print("turnstile already unlocked, returning coin")@transition("Unlocked -> Locked")@event_condition(lambdaself:self.evt.get("action")=="push")defon_push(self):print("Locking turnstile")Initialize your state machine:turnstile=Turnstile(initial_state="Locked")Send events to your state machine:evt={"action":"push"}sm.run_state(evt)# Do nothingevt={"action":"coin","coin":"invalid"}sm.run_state(evt)# Print: Invalid coin, try againevt={"action":"coin","coin":"valid"}sm.run_state(evt)# Print: Unlocking turnstileevt={"action":"coin","coin":"valid"}sm.run_state(evt)# Print: turnstile already unlocked, returning coinevt={"action":"push"}sm.run_state(evt)# Print: Locking turnstileFeaturesDefine your transitions using@transitiondecoratorEach transition can have a condition to be executed using@event_conditiondecorator.You can get the context of the state maching using the methodget_context()and load it using the methodset_context(). This allows you to use an stateless architecture and save the context of the state machine in a database.You can override the methodson_entryandon_exitin the SM. This code will be executed always at the beginning and at the end of each transition respectively.Using the decorators@on_state_entryand@on_state_exityou can archieve the same as the previous point but for each state.History0.0.1 (2023-09-26)First release on PyPI.
Package: event-store
Event StoreEvent Store is an implementation of theEvents as a Storage Mechanismconcept (PDF here). It is an implementation of the actual storage for events. The implementation follows the excellent article by Greg Young:Building an Event Storage. (PDF Here). Reading the linked articles should provide sufficient understanding of the code.InstallationTo create tables, runinfrastructure/scripts/main.pywith an option–database create. This naively assumes that your sql engine is postgresql, and is located atpostgresql://postgres:test@localhost:5432, and you have created a database namedevent_store. (You can change this inmain.py).ExamplesFor usage examples see sample projectRegistration ListFunctionalityCurrently a Sql backend is provided with simple Pickle serialization. Also, an In Memory implementation is present
for simply testing events out.Why It ExistsThere didn’t seem to be any python native event storage implementations.ContributingThe implementation is minimalistic, but pull requests are welcome. Please file an issue with an appropriate pull request.
Package: eventstore-grpc
EventStoreDB GRPC Client.Use this client to interact withEventStoreDBvia GRPC.Documentation.QuickstartInstallationpipinstalleventstore_grpcTry it!dockercomposedown\&&dockercomposeup-d\&&echo'Wait for EventStoreDB to be ready...'\&&sleep10\&&poetryrunpythonscripts/example.py\&&dockercomposedownSeethe example.TestsTo run the test locally start EventStore DB withdocker compose up, then just runpytest.Coverage
Package: eventstudy
Event Study packageEvent Study package is an open-source python project created
to facilitate the computation of financial event study analysis.Install$pipinstalleventstudyDocumentationYou can read the full documentationhere.Go through theGet started sectionto discover through simple
examples how to use theeventstudypackage to run your event study for a single event or a sample of events.Read theAPI guidefor more details on functions and their parameters.
Package: event-timer
Event TimerDescriptionA simple and light event countdown manager. Here, event is anything that you need countdown on. You can almost fill anything as event such as movie release dates or appointments.FeaturesAbility to run countdown of multiple events and printing of countdown is in different time format (GMT, Nepali, Indian)Event creation is as easy as adding a few lines. It find the config files in different locations and even from argumentOutput is colorful and oddly satisfyingInstallationUse either of any options:pip install event-timerpython3 setup.py installUsageBefore running this tool, create or edit config files which can be found in different locations. The order in which looks for config file is:--config filename.cfg{CURRENT_WORKING_DIRECTORY}/{DEFAULT_FILES}~/{DEFAULT_FILES}EventTimer/{DEFAULT_FILES} if you use it without installation.Here,{DEFAULT_FILES}:("event.cfg", ".event.cfg", "event_config.cfg", ".event_config.cfg").{CURRENT_WORKING_DIRECTORY}: The directory in which you are when running the programThe default_file list may change and is found in src/EventTimer/lib/Globals.pyFinally,EventTimerorpython3 EventTimer.pyto run.ExamplesSee examples folder for event.cfg examplesLimitationsProviding wrong data will cause wrong time to be displayed especially when choosing timezones. Some timezones maybe 1hr forward or backward so
caution is advised on important events.Unhidden logical bugs or faults in modulesTodoSend notification libnotifysend and slack notification when timer is reached.
Package: event-tools
Usage>>>importnumpyasnp>>>fromevent_toolsimportget_events>>>>>>raw_data=np.load("tests/dRNA.npy").astype(np.float64)>>>et=get_events(raw_data)>>>et.start,et.end,et.n(0,12351,12351)>>>foreventinet.event[:5]:>>>print(event.start,event.length,event.mean,event.stdv)05.0578.09.23038460737209157.0552.57142857142865.576920370275112123.0564.66666666666669.463379711055676153.0548.66666666666663.2998316455440815184.0553.754.205650960315181
Package: eventtracer-py
Generating Data:Create tracerfrom eventtracer import EventTracer
et = EventTracer("myeventlog.json")Procedural APIet.begin("Eating Cake")
...
et.end()Decorator API@et.decorator
def foo():
    ...

foo()Context Manager APIwith et.context("doing stuff"):
    ...Profiler APIet.set_profile(True)If filename isn't specified, then data will be buffered
in-memory (et.buffer) and can be written to disk in
one go withet.flush(filename).Viewing Data:Visitchrome://tracingLoad JSON fileFormat Spec:Google DocUses the JSON Array Format because that's the one which can be appended to from multiple threadsPackaging Howto:Because I forget every time I need to do this...vim setup.py  # change version
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*
Package: event-vision-library
Event Vision LibraryFeaturesPython 3.7, 3.8, 3.9, 3.10Pure-python library🚧 This library is under construction and currently alpha version. The APIs may change significantly. Contributions and discussions are welcomed! 🚧DataSupport different data types (.text, .raw, .hdf5, .npy, .aedat) for various file encoding of event dataROS bag files (optional, based on ROS installation)Support multiple existing dataset (e.g., ECD, MVSEC, DSEC, etc.)Support iterator-based loading and also block-based (random access) loading.AlgorithmsHave different off-the-shelf methods, ready to use:Optical Flow estimationImage reconstructionEgo-motion estimationmore to come.C++ implementation and extension for faster execution (TODO)Log and VsualizationVarious visualization for 2D/3D representation of eventsUseful loggingInstallationYou can installEvent Vision LibraryviapipfromPyPI:$pipinstallevent-vision-libraryUsagePlease see our examples and documentations.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,Event Vision Libraryis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.AcknowledgementThis project was generated fromHypermodern Python Cookiecuttertemplate.
Package: event-voxel-builder
Fast Event Voxel Builder[Codeberg Repo][API Document]Warning: Very Unstable API!This is currently a rush project for CVPR 2024 and the API will definitely be rewritten after the DDL.To run the example Python codes or your own Python codeDownloadevent-voxel-builder-*.whlunder[releases]and install usingpip install, or
install from[PyPI].Run Python example codes inexamplesor your own codes.Copyright (c) 2023 Bohan Yu. All rights reserved.EventVoxelBuilder is free software licensed under GNU Affero General Public License version 3 or latter.
Package: event-web-scout
event-web-scoutConfiguration is a JSON with 3 elements:plugin_entry_points- list of entry points that will be scanned for pluginsplugin_defaults- default plugin config (overriden by config defined explicitly for each individual plugin); default value is an empty objectplugins- array of configurations for individual plugins; each configuration has 3 properties:name- name of the plugin (name of the plugin package)priority- priority of plugin execution (lower number = higher priority); plugins with the same priority value will be executed in alphabetical orderenabled- whether the plugin is enabledconfig- individual plugin configuration; will be passed to the plugin constructor as the first argument{"plugin_entry_points":["example_plugins"],"plugin_defaults":{"priority":10,"enabled":false,"config":{"google_service_account_token_file":"google_service_account_token.json","google_calendar_id":"<google_calendar_id>"}},"plugins":[{"name":"example_plugin","priority":3,"enabled":true,"config":{"example_prop_1":"example_value_1"}},{"name":"cool_plugin_1","config":{"google_calendar_id":"cool_calendar_id"}}]}JSON schema generation was done using these tools:TransformCode Beautify
Package: eventyst
eventystEventyst is a flexible and maintainable event-driven data pipelining library for Python. It provides a central message broker for communicating between
pipeline steps, allowing you to easily build and update event-based data processing pipelines.FeaturesCentral message broker for communication between pipeline steps
Automatically orders pipeline steps into a directed acyclic graph (DAG) based on data sources and production
Asynchronous processing of events to ensure efficient data processing
Supports large object storage for exchanging events for larger messages
Abstracts object storage service to allow for easy switching between different storage solutions
Package: eventzapi
eventzAPIThe eventzAPI supports a Python micro services infrastructure.
It employs publish and subscribe messaging using AMQP messaging (RabbitMQ) & Event Sourcing.
It provides support for Qt or tkinter GUIs.
A Librarian Client supports querying an indelible event store (Archive).The API requires that a RabbitMQ server be accessible and if a master archive is needed, an Archivist and Librarian available through Docker Hub.
Package: eventzapi-bobj
eventzAPIThe eventzAPI supports a Python micro services infrastructure.
It employs publish and subscribe messaging using AMQP messaging (RabbitMQ) & Event Sourcing.
It provides support for Qt or tkinter GUIs.
A Librarian Client supports querying an indelible event store (Archive).The API requires that a RabbitMQ server be accessible and if a master archive is needed, an Archivist and Librarian available through Docker Hub.
Package: evenvizion
EvenVizion - is a video-based camera localization Python package.By using this package you can create a pipeline which allows evaluating the relative positions of objects and translating the coordinates of an object (relative to the frame) into a fixed coordinate system. To determine the position of an object, the main task was set – the creation of a fixed coordinate system. To solve this, we created the EvenVizion component. We show that the task can be solved even in bad filming conditions (sharp camera movement, bad weather conditions, filming in the dark and so on).More about the package structure, mathematical tools used and the explanation of visualization you can find inhttps://github.com/AIHunters/EvenVizion/blob/master/EvenVizion-video_based_camera_localization_component.pdf.Installation
The most general installation is just to use pip, which should come with
any modern Python distribution.::pip install evenvizionGet the EvenVizion Source
If you prefer to download the source yourself::git clone https://github.com/AIHunters/EvenVizion.git
cd EvenVizionLicence
EvenVizion is licensed under the MIT license, as found in the LICENSE file here:https://github.com/AIHunters/EvenVizion/blob/master/LICENSE.Send us your failure cases and feedback!Our project is open source and we will really appreciate getting your feedback!For any kind of feedback or/and enquires you can contact us atoss@aihunters.com.
Package: evenz
Simplify event-driven python!Project Featuresevenza starterClickcommand-line
applicationautomated unit tests you can run withpytestaSphinxdocumentation
projectGetting StartedThe project’s documentation contains a section to help youget
startedas a developer or user of the library.Development PrerequisitesIf you’re going to be working in the code (rather than just using the
library), you’ll want a few utilities.GNU MakePandocResourcesBelow are some handy resource links.Project DocumentationClickis a Python package for
creating beautiful command line interfaces in a composable way with
as little code as necessary.Sphinxis a tool that
makes it easy to create intelligent and beautiful documentation,
written by Geog Brandl and licnsed under the BSD license.pytesthelps you write
better programs.GNU Makeis a tool which
controls the generation of executables and other non-source files of
a program from the program’s source files.AuthorsPat Daburu-Initial work-githubSee also the list ofcontributorswho
participated in this project.LicenseMIT LicenseCopyright (c) patdaburuPermission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.