Giter Site home page Giter Site logo

jasperdanan / cloudflare-ddns Goto Github PK

View Code? Open in Web Editor NEW

This project forked from undefinedplayer/cloudflare-ddns

0.0 2.0 0.0 21 KB

DDNS script to sync public IP address to CloudFlare dns records.

Home Page: https://pypi.python.org/pypi/cloudflare-ddns/

License: MIT License

Python 100.00%

cloudflare-ddns's Introduction

cloudflare-ddns

The Python DDNS(Dynamic DNS) script for CloudFlare. It can sync your public IP address to DNS records on CloudFlare. It also provide the RESTful API to operate CloudFlare API v4.

Installation

pip install cloudflare-ddns

Examples

  1. Sync your public ip address to dns record on CloudFlare

    • Use command in command line
    cloudflare-ddns email api_key domain
    • Print command line help
    cloudflare-ddns --help
    • Execute python package in command line
    python -m cloudflare_ddns email api_key domain --proxied
    • Python code
    from cloudflare_ddns import CloudFlare
    cf = CloudFlare(email, api_key, domain)
    cf.sync_dns_from_my_ip() # Successfully updated IP address from xx.xx.xx.xx to xx.xx.xx.xx
  2. RESTful dns record operation

cf.get_record('A', 'example.com')
cf.create_record('A', 'sub.example.com', '202.202.202.202')
cf.update_record('A', 'another.example.com', '202.202.202.202')
cf.delete_record('A', 'another.example.com')

Please note: The class will cache dns records information it gets from CloudFlare. To refresh cache, call 'refresh' method:

cf.refresh()

cloudflare-ddns's People

Contributors

brianmitchl avatar jasperdanan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.