{"id":16061081,"url":"https://github.com/amancevice/fest","last_synced_at":"2025-03-17T16:32:27.079Z","repository":{"id":44853955,"uuid":"114305285","full_name":"amancevice/fest","owner":"amancevice","description":"Sync public facebook page events to Google Calendar","archived":false,"fork":false,"pushed_at":"2024-03-10T15:21:52.000Z","size":307,"stargazers_count":13,"open_issues_count":1,"forks_count":5,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-10-10T04:07:55.084Z","etag":null,"topics":["aws","facebook","google-calendar","heroku","python"],"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/amancevice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-14T23:15:57.000Z","updated_at":"2024-06-18T22:53:15.000Z","dependencies_parsed_at":"2023-02-09T12:15:28.739Z","dependency_job_id":null,"html_url":"https://github.com/amancevice/fest","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amancevice%2Ffest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amancevice%2Ffest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amancevice%2Ffest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amancevice%2Ffest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amancevice","download_url":"https://codeload.github.com/amancevice/fest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221697077,"owners_count":16865535,"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":["aws","facebook","google-calendar","heroku","python"],"created_at":"2024-10-09T04:07:47.536Z","updated_at":"2024-10-27T15:18:32.033Z","avatar_url":"https://github.com/amancevice.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Facebook Event State Transfer\n\n![pypi](https://img.shields.io/pypi/v/fest?color=yellow\u0026logo=python\u0026logoColor=eee\u0026style=flat-square)\n![python](https://img.shields.io/pypi/pyversions/fest?logo=python\u0026logoColor=eee\u0026style=flat-square)\n[![pytest](https://img.shields.io/github/actions/workflow/status/amancevice/fest/pytest.yml?logo=github\u0026style=flat-square)](https://github.com/amancevice/fest/actions/workflows/pytest.yml)\n[![coverage](https://img.shields.io/codeclimate/coverage/amancevice/fest?logo=code-climate\u0026style=flat-square)](https://codeclimate.com/github/amancevice/fest/test_coverage)\n[![maintainability](https://img.shields.io/codeclimate/maintainability/amancevice/fest?logo=code-climate\u0026style=flat-square)](https://codeclimate.com/github/amancevice/fest/maintainability)\n\nSync public facebook page events to Google Calendar.\n\n## Prerequisites\n\nBefore beginning you will need to create and configure a [facebook app](./docs/facebook.md#facebook) and use it to acquire a page access token for Graph API.\n\nYou will also need to set up a Google [service account](./docs/google.md#google) to acquire a credentials file to authenticate with Google APIs.\n\n## Installation\n\nInstall `fest` using pip:\n\n```bash\npip install fest\n```\n\n### Basic Use\n\nUse clients for facebook's Graph API and Google's Calendar API to create `FacebookPage` and `GoogelCalendar` objects, then synchronize:\n\n```python\nimport facebook\nfrom googleapiclient import discovery\n\nimport fest\n\n# Connect to Graph API \u0026 Calendar API\ngraphapi = facebook.GraphAPI('\u003cfacebook-page-token\u003e')\ncalendarapi = discovery.build('calendar', 'v3', cache_discovery=False)\n\n# Get Page/Calendar objects\npage = fest.FacebookPage(graphapi, '\u003cfacebook-page-name-or-id\u003e')\ngcal = fest.GoogleCalendar(calendarapi, '\u003cgoogle-calendar-id\u003e')\n\n# Sync Calendar \u003c= Page\nreq = gcal.sync(page, time_filter='upcoming')\nres = req.execute()\n```\n\n## Deployment\n\nSeveral methods of deployment are provided.\n\n### AWS\n\nA pair of [terraform](https://github.com/amancevice/terraform-aws-facebook-gcal-sync) [modules](https://github.com/amancevice/terraform-aws-facebook-gcal-sync-secrets) module are provided to deploy this tool as a Lambda function on AWS and invoke it on a cron using CloudWatch.\n\n```hcl\n# WARNING Be extremely cautious when using secret versions in terraform\n# NEVER store secrets in plaintext and encrypt your remote state\n# I recommend applying the secret versions in a separate workspace with no remote backend,\n# or curating them manually in the console or AWS CLI.\nresource \"aws_secretsmanager_secret_version\" \"facebook\" {\n  secret_id     = module.facebook_gcal_sync.facebook_secret.id\n  secret_string = \"my-facebook-app-token\"\n}\n\nresource \"aws_secretsmanager_secret_version\" \"google\" {\n  secret_id     = module.facebook_gcal_sync.google_secret.id\n  secret_string = file(\"./path/to/my/svc/acct/creds.json\")\n}\n\nmodule facebook_gcal_sync {\n  source  = \"amancevice/facebook-gcal-sync/aws\"\n  version = \"~\u003e 1.0\"\n\n  facebook_page_id     = \"\u003cfacebook-page-id\u003e\"\n  facebook_secret_name = \"facebook/my-app\"\n  google_calendar_id   = \"\u003cgoogle-calendar-id\u003e\"\n  google_secret_name   = \"google/my-svc-acct\"\n}\n```\n\n### Heroku\n\nA [terraform module](https://github.com/amancevice/terraform-heroku-facebook-gcal-sync) module is provided to deploy this tool as a Heroku application.\n\n```hcl\nmodule facebook_gcal_sync {\n  source                  = \"amancevice/facebook-gcal-sync/heroku\"\n  app_name                = \"\u003cunique-app-name\u003e\"\n  facebook_page_id        = \"\u003cfacebook-page-id\u003e\"\n  google_calendar_id      = \"\u003cgoogle-calendar-id\u003e\"\n  google_credentials_file = \"\u003cpath-to-google-service-credentials\u003e\"\n  facebook_page_token     = \"\u003cfacebook-page-access-token\u003e\"\n}\n```\n\nAlternatively, deploy with one click:\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famancevice%2Ffest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famancevice%2Ffest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famancevice%2Ffest/lists"}