{"id":23537509,"url":"https://github.com/py-package/masonite-instant-articles","last_synced_at":"2025-04-23T14:14:50.820Z","repository":{"id":44867847,"uuid":"449685211","full_name":"py-package/masonite-instant-articles","owner":"py-package","description":"This helps you generate facebooks instant articles and also regular feeds with enough customizations you might need.","archived":false,"fork":false,"pushed_at":"2022-08-04T12:30:27.000Z","size":74,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T14:14:50.447Z","etag":null,"topics":["feed","instant-articles","masonite","masonite-package","package","rss"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/py-package.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-19T12:37:16.000Z","updated_at":"2024-05-23T06:34:47.000Z","dependencies_parsed_at":"2022-09-26T17:20:54.516Z","dependency_job_id":null,"html_url":"https://github.com/py-package/masonite-instant-articles","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-package%2Fmasonite-instant-articles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-package%2Fmasonite-instant-articles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-package%2Fmasonite-instant-articles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/py-package%2Fmasonite-instant-articles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/py-package","download_url":"https://codeload.github.com/py-package/masonite-instant-articles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250447979,"owners_count":21432165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["feed","instant-articles","masonite","masonite-package","package","rss"],"created_at":"2024-12-26T03:16:11.840Z","updated_at":"2025-04-23T14:14:50.796Z","avatar_url":"https://github.com/py-package.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Instant Articles\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://banners.beyondco.de/Masonite%20Instant%20Article.png?theme=light\u0026packageManager=pip+install\u0026packageName=masonite-instant-article\u0026pattern=charlieBrown\u0026style=style_2\u0026description=generate%20facebooks%20instant%20articles%20and%20feeds.\u0026md=1\u0026showWatermark=1\u0026fontSize=100px\u0026images=adjustments\u0026widths=50\u0026heights=50\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \n  \u003cimg alt=\"GitHub Workflow Status\" src=\"https://github.com/py-package/masonite-instant-articles/actions/workflows/python-package.yml/badge.svg\"\u003e\n  \u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/masonite-instant-article\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3.8+-blue.svg\" alt=\"Python Version\"\u003e\n  \u003cimg alt=\"GitHub release (latest by date including pre-releases)\" src=\"https://img.shields.io/github/v/release/py-package/masonite-instant-articles\"\u003e\n  \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/py-package/masonite-instant-articles\"\u003e\n  \u003ca href=\"https://github.com/py-package/masonite-instant-article/stargazers\"\u003e\u003cimg alt=\"star\" src=\"https://img.shields.io/github/stars/py-package/masonite-instant-articles\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**If you are seeking package for generating instant article or feeds in Masonite then yes, this package is for you.**\n\n\u003e This helps you generate facebooks instant articles and also regular feeds with enough customizations you might need.\n\n## Installation\n\n```shell\npip install masonite-instant-article\n```\n\n## Configuration\n\nAdd `InstantArticleProvider` to your project in `config/providers.py`:\n\n```python\n# config/providers.py\n# ...\nfrom instant_article.providers import InstantArticleProvider\n\n# ...\nPROVIDERS = [\n    # ...\n    # Third Party Providers\n    InstantArticleProvider\n    # ...\n]\n```\n\nThen you can publish the configuration by doing:\n\n```bash\npython craft package:publish instant_article\n```\n\n## Update Configurations\n\nYou need to define options in your `instant_article` configuration file inside `config` directory.\n\n```python\n# config\nINSTANT_ARTICLE = {\n    \"force_validate\": False,\n    \"feed_details\": {\n        \"your-custom-route-name.xml\": {\n            'model': 'path-to-your-model-class',\n            'title': '',\n            'description': '',\n            'lang': 'en-us',\n            'brand': '',\n            'type': 'instant-article' # feed, instant-article\n        }\n    }\n}\n\n# Example\nINSTANT_ARTICLE = {\n    \"force_validate\": False,\n    \"feed_details\": {\n        \"blogs-rss.xml\": {\n            'model': 'app.models.Blog',\n            'title': 'Blog Feed',\n            'description': '',\n            'lang': 'en-us',\n            'brand': '',\n            'type': 'instant-article' # feed, instant-article\n        },\n        \"news-rss.xml\": {\n            'model': 'app.models.News',\n            'title': 'News Feed',\n            'description': '',\n            'lang': 'en-us',\n            'brand': '',\n            'type': 'instant-article' # feed, instant-article\n        }\n    }\n}\n\n# Above feeds can be access from:\n\"\"\"\nhttps://your-domain.com/rss/blogs-rss.xml\nhttps://your-domain.com/rss/news-rss.xml\n\"\"\"\n```\n\n## Implementation\n\n```python\nfrom instant_article.interfaces.instant_article_interface import InstantArticleInterface\nfrom instant_article.models.instant_article import InstantArticle\n\n\nclass YourModel(Model, InstantArticleInterface):\n\n\n    @staticmethod\n    def get_feed_items():\n        return YourModel.all() # can be any query returning proper values\n\n    def format_feed(self):\n        return InstantArticle.create({\n            'id': self.id, # required | integer\n            'title': self.name, # required | string\n            'subtitle': '', # nullable | string\n            'kicker': '', # nullable | string\n            'summary': '', # required | string\n            'description': '', # required | string\n            'cover': '', # nullable | string\n            'updated': self.updated_at, # required | date\n            'published': self.created_at, # required | date\n            'link': '', # full url to item...\n            'author': '' # nullable | email | string\n        })\n```\n\nYour project is now ready to go :+1:.\n\n## Contributing\n\nPlease read the [Contributing Documentation](CONTRIBUTING.md) here.\n\n## License\n\nmasonite-filemanager is open-sourced software licensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpy-package%2Fmasonite-instant-articles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpy-package%2Fmasonite-instant-articles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpy-package%2Fmasonite-instant-articles/lists"}