Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
DBOS Transact is a Python library providing ultra-lightweight durable execution. For example:
@DBOS.step()
def step_one():
...
@DBOS.step()
def step_two():
...
@DBOS.workflow()
def workflow()
step_one()
step_two()
Durable execution means your program is resilient to any failure. If it is ever interrupted or crashes, all your workflows will automatically resume from the last completed step. If you want to see durable execution in action, check out this demo app (source code here). No matter how many times you try to crash it, it always resumes from exactly where it left off!
Under the hood, DBOS Transact works by storing your program's execution state (which workflows are currently executing and which steps they've completed) in a Postgres database. So all you need to use it is a Postgres database to connect to—there's no need for a "workflow server." This approach is also incredibly fast, for example 25x faster than AWS Step Functions.
Some more cool features include:
Install and configure with:
pip install dbos
dbos init --config
Then, try it out with this simple program (requires Postgres):
from fastapi import FastAPI
from dbos import DBOS
app = FastAPI()
DBOS(fastapi=app)
@DBOS.step()
def step_one():
print("Step one completed!")
@DBOS.step()
def step_two():
print("Step two completed!")
@DBOS.workflow()
def dbos_workflow():
step_one()
for _ in range(5):
print("Press Control + \ to stop the app...")
DBOS.sleep(1)
step_two()
@app.get("/")
def fastapi_endpoint():
dbos_workflow()
Save the program into main.py
, edit dbos-config.yaml
to configure your Postgres connection settings, and start it with fastapi run
.
Visit localhost:8000
in your browser to start the workflow.
When prompted, press Control + \
to force quit your application.
It should crash midway through the workflow, having completed step one but not step two.
Then, restart your app with fastapi run
.
It should resume the workflow from where it left off, completing step two without re-executing step one.
To learn how to build more complex workflows, see our programming guide or examples.
More examples here!
If you're interested in building with us, please star our repository and join our community on Discord! If you see a bug or have a feature request, don't hesitate to open an issue here on GitHub. If you're interested in contributing, check out our contributions guide.
FAQs
Ultra-lightweight durable execution in Python
We found that dbos demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.