rss.storage
rss.storage
create_id(base_url)
create_object(connection, config, obj)
async
Given an ActivityPub object without id, it is assigned an id, syndicated via cattle_grid, and stored.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
broker |
|
required | |
base_url |
The start of the URI for the object |
required | |
obj |
dict
|
The base object being created |
required |
Returns:
| Type | Description |
|---|---|
str
|
The URI of the created object |
Source code in rss/storage.py
retrieve_object(object_id)
async
with_database(db_url='sqlite://:memory:')
async
Context manager that opens the database connection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
db_url |
Database connection string |
'sqlite://:memory:'
|