shcli

Python client for Socialhome

MIT License

Stars
5
Committers
1

shcli

Python client for Socialhome.

Introduction

Interact with your Socialhome account using the shcli client. This library will provide a CLI utility and a Python API.

Installation

From PyPi

pip install shcli

As a Snap

# For example on Ubuntu. See https://snapcraft.io/ for support on other OS's.
sudo snap install shcli 

Usage

Tool help:

shcli --help

Creating content

Tool

shcli create <domain.tld> <token> -t <text> -v <visibility>

For example:

shcli create socialhome.network 123456789abcdefg -t 'Hello, World!' \
    -v public

Python API

import shcli

shcli.create(<domain.tld>, <token>, <text>, <visibility>)

For example:

shcli.create(
    "socialhome.network", "123456789abcdefg", "Hello, World!", "public"
)

Visibility parameter can be one of public, limited, site or self.

Returns the created Content object as JSON or another response with possible error messages.

Development

Install for development

pip install -U -r dev-requirements.txt

Running tests

py.test

License

MIT

Author

Jason Robinson / https://jasonrobinson.me / @jaywink:federator.dev