manetta
3 years ago
4 changed files with 74 additions and 13 deletions
@ -1,2 +1,3 @@ |
|||
venv/ |
|||
*.pem |
|||
__pycache__ |
|||
|
@ -1,4 +1,50 @@ |
|||
# AP test in Flask |
|||
|
|||
This is a testing area! :) |
|||
A basic ActivityPub server written in Flask, that listens to follow requests, based on this tutorial: <https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/> |
|||
|
|||
This is a testing area :), to see if it is possible to use Python and Flask to write a small server that speaks ActivityPub. |
|||
|
|||
This repository was sparked from a curiosity in federation and light-weight (static) website making. |
|||
|
|||
Operating on the level of the ActivityPub protocol will hopefully give some insights in the way that networks on the Fediverse federate with each other. |
|||
|
|||
* What are the minimal requirements to run an Activity Pub server? |
|||
* How could a static site federate its content with the Fediverse? |
|||
* How are ActivityPub feeds similar and different from RSS feeds? |
|||
* How can such server be used? What kind of publishing tools can be imagined? |
|||
* What ActivityPub "objects" (is that the right term?) can we try out and use, next to the commonly used "Note" object? |
|||
|
|||
# Install this prototype |
|||
|
|||
When you run this prototype on a server, you could connect to the Fediverse. |
|||
|
|||
## Prepare your server |
|||
|
|||
For this you need to following: |
|||
|
|||
* a subdomain for the server, for example: `ap.example.com` |
|||
* a SSL certificate for this domain, for which you could use: `certbot` from <https://letsencrypt.org/> |
|||
* a reverse proxy configuration, relaying the subdomain to the Flask application running on port `5010` (by default) |
|||
|
|||
Once this is set up, you can install this prototype. |
|||
|
|||
## Install the prototype |
|||
|
|||
Make a virtual environment: |
|||
|
|||
`$ python3 -m venv FOLDERNAME` |
|||
|
|||
Activate the environment: |
|||
|
|||
`$ source FOLDERNAME/bin/activate` |
|||
|
|||
Install the dependencies: |
|||
|
|||
`$ pip install -r requirements.txt` |
|||
|
|||
Run the Flask application: |
|||
|
|||
`$ python3 run.py` |
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,14 @@ |
|||
certifi==2020.11.8 |
|||
chardet==3.0.4 |
|||
click==7.1.2 |
|||
Flask==1.1.2 |
|||
idna==2.10 |
|||
itsdangerous==1.1.0 |
|||
Jinja2==2.11.2 |
|||
MarkupSafe==1.1.1 |
|||
pkg-resources==0.0.0 |
|||
pycryptodome==3.9.9 |
|||
requests==2.25.0 |
|||
urllib3==1.26.2 |
|||
Werkzeug==1.0.1 |
|||
|
Loading…
Reference in new issue