{"id":19929084,"url":"https://github.com/thescriptguy/cloudflare-scripts","last_synced_at":"2026-06-12T05:31:22.139Z","repository":{"id":200255667,"uuid":"705114433","full_name":"TheScriptGuy/cloudflare-scripts","owner":"TheScriptGuy","description":"Python scripts to help make cloudflare operations easier","archived":false,"fork":false,"pushed_at":"2023-10-15T05:34:31.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T11:18:55.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheScriptGuy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-15T04:07:23.000Z","updated_at":"2023-10-15T05:34:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f696353-9c91-4dd3-bbf8-13570bc31a37","html_url":"https://github.com/TheScriptGuy/cloudflare-scripts","commit_stats":null,"previous_names":["thescriptguy/cloudflare-scripts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheScriptGuy/cloudflare-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheScriptGuy%2Fcloudflare-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheScriptGuy%2Fcloudflare-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheScriptGuy%2Fcloudflare-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheScriptGuy%2Fcloudflare-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheScriptGuy","download_url":"https://codeload.github.com/TheScriptGuy/cloudflare-scripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheScriptGuy%2Fcloudflare-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34231214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T22:41:50.470Z","updated_at":"2026-06-12T05:31:22.123Z","avatar_url":"https://github.com/TheScriptGuy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python and Cloudflare\n\n## DNS record updating\nIn an attempt to create or update a DNS record, I created a python script to help with this.\n\nThere are some requirements.\n\nThere needs to be a `cf-info.json` file with the following details in it:\n```json\n{\n    \"api_token\": \"\",\n    \"zone_id\": \"\",\n    \"domain_name\": \"\"\n}\n```\n* `api_token` is the Cloudflare Token used to update.\n* `zone_id` is the zone id for the zone that will be updated.\n* `domain_name` is the name of the domain name.\n\nUsage:\n```bash\n$ python3 cf-dns-record.py -h\nusage: cf-dns-record.py [-h] [--hostname HOSTNAME] [--value VALUE]\n\nUpdate Cloudflare DNS Record\n\noptional arguments:\n  -h, --help           show this help message and exit\n  --hostname HOSTNAME  Type of DNS record to be created/updated.\n  --value VALUE        Value of Record\n``` \n\nIt's important to note that the hostname does not include the actual `domain_name` field from the json file.\n\nHere's an example:\nTo create the entry `another_host.example.com` to point to `1.1.1.1`.\n```bash\n$ python3 cf-dns-record.py --hostname another_host --value 1.1.1.1\nDNS record for 'another_host.example.com' created with IP address 1.1.1.1.\n```\n\nTo update an existing entry `another_host.example.com` to point to 1.1.1.2.\n```bash\n$ python3 cf-dns-record.py --hostname another_host --value 1.1.1.2\nDNS record for 'another_host.rockingtheplanet.com' updated.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthescriptguy%2Fcloudflare-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthescriptguy%2Fcloudflare-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthescriptguy%2Fcloudflare-scripts/lists"}