Skip to main content
# interactor
Interactor provides a common interface for performing complex user interactions. It's inspired by [collectiveidea's interactor gem](https://github.com/collectiveidea/interactor).

### An Example Interactor

```python
from interactor import Interactor

class AuthenticateUser(Interacotr):

def run(self):

user = User.authenticate(self.context.email, self.context.password)
if user:
self.context.user = user
self.context.token = user.secret_token
else:
raise RuntimeError('Fail to authenticate user')
```

### Usage

```python
from somewhere import AuthenticateUser

ctx = AuthenticateUser.call(email='test@gmail.com', password='secret')
print ctx.user
print ctx.token
```

Release files for interactor 0.1.2

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

Source distribution (sdist)

Source distribution for interactor 0.1.2
File Size Uploaded
interactor-0.1.2.tar.gz 2.0 kB Details

Release files / interactor-0.1.2.tar.gz

Download URL interactor-0.1.2.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9bdb1910b912b66a977d039c745c250acde047541abfabee04925cc8284208e7
BLAKE2b-256 checksum
How to use checksums
b7bd9682c29bedd8002e42ab5b90a1c245951ffe0185bd83ca501b4036960b5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

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