
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
# main.py
from typing import NamedTuple
import pydepot
class State(NamedTuple):
counter: int
class AddToCounterAction(pydepot.Action):
def __init__(self, value: int):
self.value: int = value
class AddToCounterReducer(pydepot.Reducer[AddToCounterAction, State]):
@property
def action_type(self) -> type[AddToCounterAction]:
return AddToCounterAction
def apply(self, action: AddToCounterAction, state: State) -> State:
return State(counter=state.counter + action.value)
class CounterSubscriber(pydepot.StoreSubscriber[State]):
def on_state(self, state: State) -> None:
print(f"The counter has changed to {state.counter}.")
def main() -> None:
store = pydepot.Store(initial_state=State(counter=0))
store.register(AddToCounterReducer())
subscriber = CounterSubscriber()
store.subscribe(subscriber)
store.dispatch(AddToCounterAction(value=42))
if __name__ == "__main__":
main()
$ python3 main.py
The counter has changed to 42!
Pydepot is available as pydepot on PyPI:
pip install pydepot
For detailed quickstart and API reference, visit the Documentation

Copyright (C) 2023 tombartk
This program is free software: you can redistribute it and/or modify it under the terms
of the GNU Affero General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program.
If not, see https://www.gnu.org/licenses/.
FAQs
Strongly-typed, scalable state management for Python.
We found that pydepot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.