https://github.com/capjamesg/indieweb-utils

Utilities to aid the implementation of various IndieWeb specifications and functionalities. Built with Python.

https://github.com/capjamesg/indieweb-utils

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

indieweb python
Last synced: 6 months ago · JSON representation

Repository

Utilities to aid the implementation of various IndieWeb specifications and functionalities. Built with Python.

Basic Info
Statistics
  • Stars: 27
  • Watchers: 3
  • Forks: 2
  • Open Issues: 0
  • Releases: 7
Topics
indieweb python
Created about 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing Funding License Security

README.md

Python indieweb-utils Library

Documentation Status image image image image

indieweb-utils provides building blocks for people implementing IndieWeb applications in Python. Discover IndieWeb endpoints, find feeds on a page, infer page names, generate reply contexts, and more!

The documentation for this project is available at indieweb-utils.readthedocs.io.

Installation 💻

To get started, pip install indieweb-utils:

pip install indieweb-utils

Quickstart ⚡

Here are a few quick code snippets for actions enabled by IndieWeb Utils.

get reply context about a URL

``` python import indieweb_utils

context = indiewebutils.getreplycontext( url="https://jamesg.blog", summaryword_limit=50 )

print(context.name) # "Home | James' Coffee Blog" ```

Remove tracking parameters from a URL

``` python import indieweb_utils

url = "https://jamesg.blog/indieweb/?utmsource=twitter&utmmedium=social&utm_campaign=webmention"

urlwithouttracking = indiewebutils.removetracking_params(url)

print(urlwithouttracking) # https://jamesg.blog/indieweb/ ```

Create a paginator for a series

``` python import indieweb_utils

pages = indieweb_utils.Paginator(["post1", "post2", ...], 1)

print(pages.next_page()) [["post1"]] ```

License 👩‍⚖️

The code in this project is licensed under the Zero-Clause BSD License.

The documentation in this project is licensed under a CC BY-SA 4.0 license.

Running Tests 🧪

Quality is maintained ensuring each merged passes testing, typing, linting, and formatting requirements.

To check locally install the development dependencies and run the suite using [tox]{.title-ref}.

$ pip install -r requirements_dev.txt
$ tox

Alternatively, you can run just a single check by passing the environment to tox.

Unit Tests

Tests use pytest.

$ tox -e py39  # Run all tests
$ tox -e py39 tests/test_indieweb_utils.py::TestPostTypeDiscovery  # Run a single test

Linting

Linting is checked with black, isort, and flake8.

$ tox -e lint

Black and isort errors can be fixed automatically. Use fmt to fix those errors automatically.

$ tox -e fmt

Typing

Types are validated with mypy.

$ tox -e typecheck

Contributing 🛠️

This project welcomes contributions from anyone who wants to improve the library.

Please see the contributing guidelines for more information on how to contribute to the repository.

Contributors 💻

Owner

  • Name: James
  • Login: capjamesg
  • Kind: user
  • Location: Scotland
  • Company: @Roboflow

from words, wonder.

GitHub Events

Total
  • Watch event: 5
  • Delete event: 2
  • Push event: 23
  • Pull request event: 4
  • Create event: 1
Last Year
  • Watch event: 5
  • Delete event: 2
  • Push event: 23
  • Pull request event: 4
  • Create event: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 30
  • Total pull requests: 86
  • Average time to close issues: 5 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 3
  • Total pull request authors: 4
  • Average comments per issue: 1.53
  • Average comments per pull request: 0.62
  • Merged pull requests: 73
  • Bot issues: 0
  • Bot pull requests: 19
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 months
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • capjamesg (27)
  • jamesvandyne (2)
  • snarfed (1)
Pull Request Authors
  • capjamesg (53)
  • dependabot[bot] (19)
  • jamesvandyne (12)
  • luord (2)
Top Labels
Issue Labels
enhancement (10) good first issue (6) testing (5) documentation (5) question (4) bug (3) help wanted (3)
Pull Request Labels
enhancement (25) dependencies (19) documentation (13) bug (7) help wanted (4) testing (2) question (2) python (2) release (1)

Dependencies

docs/requirements.txt pypi
  • beautifulsoup4 ==4.10.0
  • bs4 ==0.0.1
  • certifi ==2021.10.8
  • charset-normalizer ==2.0.9
  • html5lib ==1.1
  • idna ==3.3
  • indieweb_utils ==0.1.2
  • mf2py ==1.1.2
  • requests ==2.26.0
  • six ==1.16.0
  • soupsieve ==2.3.1
  • urllib3 ==1.26.7
  • webencodings ==0.5.1
requirements.txt pypi
  • beautifulsoup4 ==4.10.0
  • lxml ==4.7.1
  • mf2py ==1.1.2
  • pyjwt ==2.4.0
  • requests ==2.26.0
requirements_dev.txt pypi
  • black ==21.12b0
  • flake8 ==4.0.1
  • isort ==5.10.1
  • mypy ==0.931
  • pytest ==6.2.5
  • pytest-pythonpath ==0.7.3
  • responses ==0.17.0
  • tox ==3.24.5
  • types-dataclasses ==0.6.4
  • types-requests ==2.27.3
  • typing-extensions ==4.0.1
.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v2 composite
  • github/codeql-action/analyze v1 composite
  • github/codeql-action/autobuild v1 composite
  • github/codeql-action/init v1 composite