Skip to main content
# Welcome to ActionDB
*The database that doesn't wait for you, it **goes**.*

![MyPy](https://img.shields.io/badge/MyPy-Passing-blue.svg)
![Flake8](https://img.shields.io/badge/Flake8-Pep%208-brightgreen.svg)
[![Build Status](https://travis-ci.org/Zwork101/actionDB.svg?branch=master)](https://travis-ci.org/Zwork101/actionDB)
Full docs [here](https://zwork101.github.io/action/)

## Introduction

Welcome to actionDB, the DB that comes to you. ActionDB is designed to keep events that need to be summoned at a later
date persistent. Personally, this will be used when I make discord bots via
https://github.com/b1naryth1ef/disco. However this doesn't mean you
can't use this with anything else, you can, and I highly encourage that you do. While this library was designed so that
you could easily create and use your own backend, you're welcome to use the sqlite3 backend that comes with it. Lastly,
I was to talk about what's planned. At some point, I want to do some major refactoring, and separate the client and
server. This would allow you connect to a remote database, something that's not essential but nice, but mainly use
whatever concurrency library you want. The backend will still be gevent, however the client can be asyncio, trio,
threading, etc.

## Quick Start

To get started, we'll need to create our client, this will also create a action.db file, however the name can be
changed when initializing:
```py
from action import Action

action = Action()
```
After this, you should add listeners to your heart's content:
```py
@action.listen("new_msg")
def new_message(name: str, content: str, id: str=None)
print(name + "\n\n" + content + "\n" + "(" + id + ")")
```
And if you want to do something, such as send a message in 5 minutes, you can do:
```py
action.trigger_in(5 * 60, "new_msg", "Hello World!", "My name is sam, and I live in a can", id="2323445")
```
Then presuming you're also doing other things, or have utilized ``gevent.joinall``, in 5 minutes you'll see:

Hello World!

My name is sam, and I live in a can
(2323445)

And that's all there is! If you want to see how you can trigger events at an exact time, or other fun stuff, see the
documentation graciously provided below!

### Note:
You can import the main classes from action like so:
```py
from action import Action, ActionBackend, ActionEmitter, Event
```
Happy Coding!

Metadata

Release files for actiondb 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for actiondb 1.1.0
File Size Uploaded Provenance
actiondb-1.1.0.tar.gz 9.8 kB Without provenance Details

Release files / actiondb-1.1.0.tar.gz

Download URL actiondb-1.1.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b38a691900dee10acd0390dea724aba91fe7ef351609d43361968a209d07f2b2
BLAKE2b-256 checksum
How to use checksums
e25203093b08a1f75431091c692ea41d9793d101d982833d7c7e28ef371684e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.9.1 pkginfo/1.4.1 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.4

Security for actiondb 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page