opengraph-writer


Nameopengraph-writer JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/jvanasco/opengraph_writer
SummaryLightweight OpenGraph support for writing and validating objects.
upload_time2023-06-13 19:26:26
maintainer
docs_urlNone
authorJonathan Vanasco
requires_python>=3.6
licenseMIT
keywords facebook opengraph open graph web pyramid
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            opengraph_writer
================

![Python package](https://github.com/jvanasco/opengraph_writer/workflows/Python%20package/badge.svg)

About
=====

This library was created to both manage writing OpenGraph data, and perform
lightweight verifications for offline debugging.

This library does the following:

- CREATE an object to stash OGP data
- VALIDATE the data, offering debug information on the object
- RENDER the object as html, and optionally include debug data on incorrect elements

This is currently aimed at "single object page data". It is not necessarily
with multi-value items yet (such as multiple profiles or tracks on a single page).

Most of the validation routines were derived from regexing the `https://ogp.me`
site into a Python dict, and researching what they are supposed to do.
The validation routes themselves are super trivial.

At the time of initially writing this library, and several checks ever since, the
specification on  the `https://ogp.me` seems out of date. 

In practice, Facebook's "premier" partners seem to all be using URLs which point 
to certain data , however there aren't any guidelines for this within the
public OGP spec.

An example would be on the Spotify integration: when looking at a `SONG`, the
`ARTIST` and `ALBUM` refer to URLs which contain the relevant data.

Documentation
=============

The Python file contains extensive inline documentation.


Contributions Welcome!
======================

If anyone wants to fork and tackle the multiple value problem, please do.


Framework Support: Pyramid
==========================

This package offers an includeme for Pyramid to set up an `opengraph_item`
as a `@reify` request method.

Simply update your application:

	config.include("opengraph_writer.pyramid_helpers")

And your `Request` objects will be extended as such:

    request.opengraph_item
    
    
    


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jvanasco/opengraph_writer",
    "name": "opengraph-writer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "facebook opengraph open graph web pyramid",
    "author": "Jonathan Vanasco",
    "author_email": "jonathan@findmeon.com",
    "download_url": "https://files.pythonhosted.org/packages/df/f6/05e93aa9a0a3fe33c21dfcd82763c29a7968cab7204534f71c717e92ceaa/opengraph_writer-0.4.0.tar.gz",
    "platform": null,
    "description": "opengraph_writer\n================\n\n![Python package](https://github.com/jvanasco/opengraph_writer/workflows/Python%20package/badge.svg)\n\nAbout\n=====\n\nThis library was created to both manage writing OpenGraph data, and perform\nlightweight verifications for offline debugging.\n\nThis library does the following:\n\n- CREATE an object to stash OGP data\n- VALIDATE the data, offering debug information on the object\n- RENDER the object as html, and optionally include debug data on incorrect elements\n\nThis is currently aimed at \"single object page data\". It is not necessarily\nwith multi-value items yet (such as multiple profiles or tracks on a single page).\n\nMost of the validation routines were derived from regexing the `https://ogp.me`\nsite into a Python dict, and researching what they are supposed to do.\nThe validation routes themselves are super trivial.\n\nAt the time of initially writing this library, and several checks ever since, the\nspecification on  the `https://ogp.me` seems out of date. \n\nIn practice, Facebook's \"premier\" partners seem to all be using URLs which point \nto certain data , however there aren't any guidelines for this within the\npublic OGP spec.\n\nAn example would be on the Spotify integration: when looking at a `SONG`, the\n`ARTIST` and `ALBUM` refer to URLs which contain the relevant data.\n\nDocumentation\n=============\n\nThe Python file contains extensive inline documentation.\n\n\nContributions Welcome!\n======================\n\nIf anyone wants to fork and tackle the multiple value problem, please do.\n\n\nFramework Support: Pyramid\n==========================\n\nThis package offers an includeme for Pyramid to set up an `opengraph_item`\nas a `@reify` request method.\n\nSimply update your application:\n\n\tconfig.include(\"opengraph_writer.pyramid_helpers\")\n\nAnd your `Request` objects will be extended as such:\n\n    request.opengraph_item\n    \n    \n    \n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Lightweight OpenGraph support for writing and validating objects.",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://github.com/jvanasco/opengraph_writer"
    },
    "split_keywords": [
        "facebook",
        "opengraph",
        "open",
        "graph",
        "web",
        "pyramid"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dff605e93aa9a0a3fe33c21dfcd82763c29a7968cab7204534f71c717e92ceaa",
                "md5": "15c41b16bc1e6c99d1b89348fb35c906",
                "sha256": "a491ce7241bb35d0b66a3e0e01848255d3bd197fb1af927a14f763962014af05"
            },
            "downloads": -1,
            "filename": "opengraph_writer-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "15c41b16bc1e6c99d1b89348fb35c906",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 13836,
            "upload_time": "2023-06-13T19:26:26",
            "upload_time_iso_8601": "2023-06-13T19:26:26.386474Z",
            "url": "https://files.pythonhosted.org/packages/df/f6/05e93aa9a0a3fe33c21dfcd82763c29a7968cab7204534f71c717e92ceaa/opengraph_writer-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-13 19:26:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jvanasco",
    "github_project": "opengraph_writer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "opengraph-writer"
}
        
Elapsed time: 0.07690s