/usr/lib/python3/dist-packages/cloudflare-2.0.4.egg-info/PKG-INFO is in python3-cloudflare 2.0.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 | Metadata-Version: 1.1
Name: cloudflare
Version: 2.0.4
Summary: Python wrapper for the Cloudflare v4 API
Home-page: https://github.com/cloudflare/python-cloudflare
Author: Martin J. Levy
Author-email: martin@cloudflare.com
License: MIT
Description-Content-Type: UNKNOWN
Description: cloudflare-python
=================
Installation
------------
Two methods are provided to install this software. Use PyPi (see
`package <https://pypi.python.org/pypi/cloudflare>`__ details) or GitHub
(see `package <https://github.com/cloudflare/python-cloudflare>`__
details).
Via PyPI
~~~~~~~~
.. code:: bash
$ sudo pip install cloudflare
$
Yes - that simple! (the sudo may not be needed in some cases).
Via github
~~~~~~~~~~
.. code:: bash
$ git clone https://github.com/cloudflare/python-cloudflare
$ cd python-cloudflare
$ ./setup.py build
$ sudo ./setup.py install
$
Or whatever variance of that you want to use. There is a Makefile
included.
Cloudflare name change - dropping the capital F
-----------------------------------------------
In Sepember/October 2016 the company modified its company name and
dropped the capital F. However, for now (and for backward compatibility
reasons) the class name stays the same.
Cloudflare API version 4
------------------------
The Cloudflare API can be found `here <https://api.cloudflare.com/>`__.
Each API call is provided via a similarly named function within the
**CloudFlare** class. A full list is provided below.
Example code
------------
All example code is available on GitHub (see
`package <https://github.com/cloudflare/python-cloudflare>`__ in the
`examples <https://github.com/cloudflare/python-cloudflare/tree/master/examples>`__
folder.
Blog
----
This package was initially introduced
`here <https://blog.cloudflare.com/python-cloudflare/>`__ via
Cloudflare's `blog <https://blog.cloudflare.com/>`__.
Getting Started
---------------
A very simple listing of zones within your account; including the IPv6
status of the zone.
.. code:: python
import CloudFlare
def main():
cf = CloudFlare.CloudFlare()
zones = cf.zones.get()
for zone in zones:
zone_id = zone['id']
zone_name = zone['name']
print zone_id, zone_name
if __name__ == '__main__':
main()
This example works when there are less than 50 zones (50 is the default
number of values returned from a query like this).
Now lets expand on that and add code to show the IPv6 and SSL status of
the zones. Lets also query 100 zones.
.. code:: python
import CloudFlare
def main():
cf = CloudFlare.CloudFlare()
zones = cf.zones.get(params = {'per_page':100})
for zone in zones:
zone_id = zone['id']
zone_name = zone['name']
settings_ssl = cf.zones.settings.ssl.get(zone_id)
ssl_status = settings_ssl['value']
settings_ipv6 = cf.zones.settings.ipv6.get(zone_id)
ipv6_status = settings_ipv6['value']
print zone_id, zone_name, ssl_status, ipv6_status
if __name__ == '__main__':
main()
In order to query more than a single page of zones, we would have to use
the raw mode (decribed more below). We can loop over many get calls and
pass the page paramater to facilitate the paging.
Raw mode is only needed when a get request has the possibility of
returning many items.
.. code:: python
import CloudFlare
def main():
cf = CloudFlare.CloudFlare(raw=True)
page_number = 0
while True:
page_number += 1
raw_results = cf.zones.get(params={'per_page':5,'page':page_number})
zones = raw_results['result']
for zone in zones:
zone_id = zone['id']
zone_name = zone['name']
print zone_id, zone_name
total_pages = raw_results['result_info']['total_pages']
if page_number == total_pages:
break
if __name__ == '__main__':
main()
A more complex example follows.
.. code:: python
import CloudFlare
def main():
zone_name = 'example.com'
cf = CloudFlare.CloudFlare()
# query for the zone name and expect only one value back
try:
zones = cf.zones.get(params = {'name':zone_name,'per_page':1})
except CloudFlare.exceptions.CloudFlareAPIError as e:
exit('/zones.get %d %s - api call failed' % (e, e))
except Exception as e:
exit('/zones.get - %s - api call failed' % (e))
if len(zones) == 0:
exit('No zones found')
# extract the zone_id which is needed to process that zone
zone = zones[0]
zone_id = zone['id']
# request the DNS records from that zone
try:
dns_records = cf.zones.dns_records.get(zone_id)
except CloudFlare.exceptions.CloudFlareAPIError as e:
exit('/zones/dns_records.get %d %s - api call failed' % (e, e))
# print the results - first the zone name
print zone_id, zone_name
# then all the DNS records for that zone
for dns_record in dns_records:
r_name = dns_record['name']
r_type = dns_record['type']
r_value = dns_record['content']
r_id = dns_record['id']
print '\t', r_id, r_name, r_type, r_value
exit(0)
if __name__ == '__main__':
main()
Providing Cloudflare Username and API Key
-----------------------------------------
When you create a **CloudFlare** class you can pass up to four
paramaters.
- Account email
- Account API key
- Optional Origin-CA Certificate Token
- Optional Debug flag (True/False)
.. code:: python
import CloudFlare
# A minimal call - reading values from environment variables or configuration file
cf = CloudFlare.CloudFlare()
# A minimal call with debug enabled
cf = CloudFlare.CloudFlare(debug=True))
# A full blown call with passed basic account information
cf = CloudFlare.CloudFlare(email='user@example.com', token='00000000000000000000000000000000')
# A full blown call with passed basic account information and CA-Origin info
cf = CloudFlare.CloudFlare(email='user@example.com', token='00000000000000000000000000000000', certtoken='v1.0-...')
If the account email and API key are not passed when you create the
class, then they are retreived from either the users exported shell
environment variables or the .cloudflare.cfg or ~/.cloudflare.cfg or
~/.cloudflare/cloudflare.cfg files, in that order.
There is one call that presently doesn't need any email or token
certification (the */ips* call); hence you can test without any values
saved away.
Using shell environment variables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code:: bash
$ export CF_API_EMAIL='user@example.com'
$ export CF_API_KEY='00000000000000000000000000000000'
$ export CF_API_CERTKEY='v1.0-...'
$
These are optional environment variables; however, they do override the
values set within a configuration file.
Using configuration file to store email and keys
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code:: bash
$ cat ~/.cloudflare/cloudflare.cfg
[CloudFlare]
email = user@example.com
token = 00000000000000000000000000000000
certtoken = v1.0-...
extras =
$
The *CF\_API\_CERTKEY* or *certtoken* values are used for the Origin-CA
*/certificates* API calls. You can leave *certtoken* in the
configuration with a blank value (or omit the option variable fully).
The *extras* values are used when adding API calls outside of the core
codebase. Technically, this is only useful for internal testing within
Cloudflare. You can leave *extras* in the configuration with a blank
value (or omit the option variable fully).
Exceptions and return values
----------------------------
Response data
~~~~~~~~~~~~~
The response is build from the JSON in the API call. It contains the
**results** values; but does not contain the paging values.
You can return all the paging values by calling the class with raw=True.
Here's an example without paging.
.. code:: python
#!/usr/bin/env python
import json
import CloudFlare
def main():
cf = CloudFlare.CloudFlare()
zones = cf.zones.get(params={'per_page':5})
print len(zones)
if __name__ == '__main__':
main()
The results are as follows.
::
5
When you add the raw option; the APIs full structure is returned. This
means the paging values can be seen.
.. code:: python
#!/usr/bin/env python
import json
import CloudFlare
def main():
cf = CloudFlare.CloudFlare(raw=True)
zones = cf.zones.get(params={'per_page':5})
print zones.length()
print json.dumps(zones, indent=4, sort_keys=True)
if __name__ == '__main__':
main()
This produces.
::
5
{
"result": [
...
],
"result_info": {
"count": 5,
"page": 1,
"per_page": 5,
"total_count": 31,
"total_pages": 7
}
}
A full example of paging is provided below.
Exceptions
~~~~~~~~~~
The library will raise **CloudFlareAPIError** when the API call fails.
The exception returns both an integer and textual message in one value.
.. code:: python
import CloudFlare
...
try
r = ...
except CloudFlare.exceptions.CloudFlareAPIError as e:
exit('api error: %d %s' % (e, e))
...
The other raised response is **CloudFlareInternalError** which can
happen when calling an invalid method.
In some cases more than one error is returned. In this case the return
value **e** is also an array. You can itterate over that array to see
the additional error.
.. code:: python
import sys
import CloudFlare
...
try
r = ...
except CloudFlare.exceptions.CloudFlareAPIError as e:
if len(e) > 0:
sys.stderr.write('api error - more than one error value returned!\n')
for x in e:
sys.stderr.write('api error: %d %s\n' % (x, x))
exit('api error: %d %s' % (e, e))
...
Exception examples
~~~~~~~~~~~~~~~~~~
Here's examples using the CLI command cli4 of the responses passed back
in exceptions.
First a simple get with a clean (non-error) response.
::
$ cli4 /zones/:example.com/dns_records | jq -c '.[]|{"name":.name,"type":.type,"content":.content}'
{"name":"example.com","type":"MX","content":"something.example.com"}
{"name":"something.example.com","type":"A","content":"10.10.10.10"}
$
Next a simple/single error response. This is simulated by providing
incorrect authentication information.
::
$ CF_API_EMAIL='someone@example.com' cli4 /zones/
cli4: /zones - 9103 Unknown X-Auth-Key or X-Auth-Email
$
Finally, a command that provides more than one error response. This is
simulated by passing an invalid IPv4 address to a DNS record creation.
::
$ cli4 --post name='foo' type=A content="1" /zones/:example.com/dns_records
cli4: /zones/:example.com/dns_records - 9005 Content for A record is invalid. Must be a valid IPv4 address
cli4: /zones/:example.com/dns_records - 1004 DNS Validation Error
$
Included example code
---------------------
The
`examples <https://github.com/cloudflare/python-cloudflare/tree/master/examples>`__
folder contains many examples in both simple and verbose formats.
A DNS zone code example
-----------------------
.. code:: python
#!/usr/bin/env python
import sys
import CloudFlare
def main():
zone_name = sys.argv[1]
cf = CloudFlare.CloudFlare()
zone_info = cf.zones.post(data={'jump_start':False, 'name': zone_name})
zone_id = zone_info['id']
dns_records = [
{'name':'foo', 'type':'AAAA', 'content':'2001:d8b::1'},
{'name':'foo', 'type':'A', 'content':'192.168.0.1'},
{'name':'duh', 'type':'A', 'content':'10.0.0.1', 'ttl':120},
{'name':'bar', 'type':'CNAME', 'content':'foo'},
{'name':'shakespeare', 'type':'TXT', 'content':"What's in a name? That which we call a rose by any other name ..."}
]
for dns_record in dns_records:
r = cf.zones.dns_records.post(zone_id, data=dns_record)
exit(0)
if __name__ == '__main__':
main()
A DNS zone delete code example (be careful)
-------------------------------------------
.. code:: python
#!/usr/bin/env python
import sys
import CloudFlare
def main():
zone_name = sys.argv[1]
cf = CloudFlare.CloudFlare()
zone_info = cf.zones.get(param={'name': zone_name})
zone_id = zone_info['id']
dns_name = sys.argv[2]
dns_records = cf.zones.dns_records.get(zone_id, params={'name':dns_name + '.' + zone_name})
for dns_record in dns_records:
dns_record_id = dns_record['id']
r = cf.zones.dns_records.delete(zone_id, dns_record_id)
exit(0)
if __name__ == '__main__':
main()
CLI
---
All API calls can be called from the command line. The command will
convert domain names on-the-fly into zone\_identifier's.
.. code:: bash
$ cli4 [-V|--version] [-h|--help] [-v|--verbose] [-q|--quiet] [-j|--json] [-y|--yaml] [-r|--raw] [-d|--dump] [--get|--patch|--post|--put|--delete] [item=value ...] /command...
CLI paramaters for POST/PUT/PATCH
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For API calls that need to pass data or parameters there is various
formats to use.
The simplest form is ``item=value``. This passes the value as a string
within the APIs JSON data.
If you need a numeric value passed then **==** can be used to force the
value to be treated as a numeric value within the APIs JSON data. For
example: ``item==value``.
if you need to pass a list of items; then **[]** can be used. For
example:
::
pool_id1="11111111111111111111111111111111"
pool_id2="22222222222222222222222222222222"
pool_id3="33333333333333333333333333333333"
cli4 --post global_pools="[ ${pool_id1}, ${pool_id2}, ${pool_id3} ]" region_pools="[ ]" /user/load_balancers/maps
Data or parameters can be either named or unnamed. It can not be both.
Named is the majority format; as described above. Unnamed parameters
simply don't have anything before the **=** sign, as in ``=value``. This
format is presently only used by the Cloudflare Load Balancer API calls.
For example:
::
cli4 --put ="00000000000000000000000000000000" /user/load_balancers/maps/:00000000000000000000000000000000/region/:WNAM
Data can also be uploaded from file contents. Using the
``item=@filename`` format will open the file and the contents uploaded
in the POST.
CLI output
~~~~~~~~~~
The output from the CLI command is in JSON or YAML format (and human
readable). This is controled by the **--yaml** or **--json** flags (JSON
is the default).
Simple CLI examples
~~~~~~~~~~~~~~~~~~~
- ``cli4 /user/billing/profile``
- ``cli4 /user/invites``
- ``cli4 /zones/:example.com``
- ``cli4 /zones/:example.com/dnssec``
- ``cli4 /zones/:example.com/settings/ipv6``
- ``cli4 --put /zones/:example.com/activation_check``
- ``cli4 /zones/:example.com/keyless_certificates``
- ``cli4 /zones/:example.com/analytics/dashboard``
More complex CLI examples
~~~~~~~~~~~~~~~~~~~~~~~~~
Here is the creation of a DNS entry, followed by a listing of that entry
and then the deletion of that entry.
.. code:: bash
$ $ cli4 --post name="test" type="A" content="10.0.0.1" /zones/:example.com/dns_records
{
"id": "00000000000000000000000000000000",
"name": "test.example.com",
"type": "A",
"content": "10.0.0.1",
...
}
$
$ cli4 /zones/:example.com/dns_records/:test.example.com | jq '{"id":.id,"name":.name,"type":.type,"content":.content}'
{
"id": "00000000000000000000000000000000",
"name": "test.example.com",
"type": "A",
"content": "10.0.0.1"
}
$ cli4 --delete /zones/:example.com/dns_records/:test.example.com | jq -c .
{"id":"00000000000000000000000000000000"}
$
There's the ability to handle dns entries with multiple values. This
produces more than one API call within the command.
::
$ cli4 /zones/:example.com/dns_records/:test.example.com | jq -c '.[]|{"id":.id,"name":.name,"type":.type,"content":.content}'
{"id":"00000000000000000000000000000000","name":"test.example.com","type":"A","content":"192.168.0.1"}
{"id":"00000000000000000000000000000000","name":"test.example.com","type":"AAAA","content":"2001:d8b::1"}
$
Here are the cache purging commands.
.. code:: bash
$ cli4 --delete purge_everything=true /zones/:example.com/purge_cache | jq -c .
{"id":"00000000000000000000000000000000"}
$
$ cli4 --delete files='[http://example.com/css/styles.css]' /zones/:example.com/purge_cache | jq -c .
{"id":"00000000000000000000000000000000"}
$
$ cli4 --delete files='[http://example.com/css/styles.css,http://example.com/js/script.js]' /zones/:example.com/purge_cache | jq -c .
{"id":"00000000000000000000000000000000"}
$
$ cli4 --delete tags='[tag1,tag2,tag3]' /zones/:example.com/purge_cache | jq -c .
cli4: /zones/:example.com/purge_cache - 1107 Only enterprise zones can purge by tag.
$
A somewhat useful listing of available plans for a specific zone.
.. code:: bash
$ cli4 /zones/:example.com/available_plans | jq -c '.[]|{"id":.id,"name":.name}'
{"id":"00000000000000000000000000000000","name":"Pro Website"}
{"id":"00000000000000000000000000000000","name":"Business Website"}
{"id":"00000000000000000000000000000000","name":"Enterprise Website"}
{"id":"0feeeeeeeeeeeeeeeeeeeeeeeeeeeeee","name":"Free Website"}
$
Cloudflare CA CLI examples
~~~~~~~~~~~~~~~~~~~~~~~~~~
Here's some Cloudflare CA examples. Note the need of the zone\_id=
paramater with the basic **/certificates** call.
.. code:: bash
$ cli4 /zones/:example.com | jq -c '.|{"id":.id,"name":.name}'
{"id":"12345678901234567890123456789012","name":"example.com"}
$
$ cli4 zone_id=12345678901234567890123456789012 /certificates | jq -c '.[]|{"id":.id,"expires_on":.expires_on,"hostnames":.hostnames,"certificate":.certificate}'
{"id":"123456789012345678901234567890123456789012345678","expires_on":"2032-01-29 22:36:00 +0000 UTC","hostnames":["*.example.com","example.com"],"certificate":"-----BEGIN CERTIFICATE-----\n ... "}
{"id":"123456789012345678901234567890123456789012345678","expires_on":"2032-01-28 23:23:00 +0000 UTC","hostnames":["*.example.com","example.com"],"certificate":"-----BEGIN CERTIFICATE-----\n ... "}
{"id":"123456789012345678901234567890123456789012345678","expires_on":"2032-01-28 23:20:00 +0000 UTC","hostnames":["*.example.com","example.com"],"certificate":"-----BEGIN CERTIFICATE-----\n ... "}
$
A certificate can be viewed via a simple GET request.
.. code:: bash
$ cli4 /certificates/:123456789012345678901234567890123456789012345678
{
"certificate": "-----BEGIN CERTIFICATE-----\n ... ",
"expires_on": "2032-01-29 22:36:00 +0000 UTC",
"hostnames": [
"*.example.com",
"example.com"
],
"id": "123456789012345678901234567890123456789012345678",
"request_type": "origin-rsa"
}
$
Creating a certificate. This is done with a **POST** request. Note the
use of **==** in order to pass a decimal number (vs. string) in JSON.
The CSR is not shown for simplicity sake.
.. code:: bash
$ CSR=`cat example.com.csr`
$ cli4 --post hostnames='["example.com","*.example.com"]' requested_validity==365 request_type="origin-ecc" csr="$CSR" /certificates
{
"certificate": "-----BEGIN CERTIFICATE-----\n ... ",
"csr": "-----BEGIN CERTIFICATE REQUEST-----\n ... ",
"expires_on": "2018-09-27 21:47:00 +0000 UTC",
"hostnames": [
"*.example.com",
"example.com"
],
"id": "123456789012345678901234567890123456789012345678",
"request_type": "origin-ecc",
"requested_validity": 365
}
$
Deleting a certificate can be done with a **DELETE** call.
.. code:: bash
$ cli4 --delete /certificates/:123456789012345678901234567890123456789012345678
{
"id": "123456789012345678901234567890123456789012345678",
"revoked_at": "0000-00-00T00:00:00Z"
}
$
Paging CLI examples
~~~~~~~~~~~~~~~~~~~
The **--raw** command provides access to the paging returned values. See
the API documentation for all the info. Here's an example of how to page
thru a list of zones (it's included in the examples folder as
**example\_paging\_thru\_zones.sh**).
.. code:: bash
:
tmp=/tmp/$$_
trap "rm ${tmp}; exit 0" 0 1 2 15
PAGE=0
while true
do
cli4 --raw per_page=5 page=${PAGE} /zones > ${tmp}
domains=`jq -c '.|.result|.[]|.name' < ${tmp} | tr -d '"'`
result_info=`jq -c '.|.result_info' < ${tmp}`
COUNT=` echo "${result_info}" | jq .count`
PAGE=` echo "${result_info}" | jq .page`
PER_PAGE=` echo "${result_info}" | jq .per_page`
TOTAL_COUNT=`echo "${result_info}" | jq .total_count`
TOTAL_PAGES=`echo "${result_info}" | jq .total_pages`
echo COUNT=${COUNT} PAGE=${PAGE} PER_PAGE=${PER_PAGE} TOTAL_COUNT=${TOTAL_COUNT} TOTAL_PAGES=${TOTAL_PAGES} -- ${domains}
if [ "${PAGE}" == "${TOTAL_PAGES}" ]
then
## last section
break
fi
# grab the next page
PAGE=`expr ${PAGE} + 1`
done
It produces the following results.
::
COUNT=5 PAGE=1 PER_PAGE=5 TOTAL_COUNT=31 TOTAL_PAGES=7 -- accumsan.example auctor.example consectetur.example dapibus.example elementum.example
COUNT=5 PAGE=2 PER_PAGE=5 TOTAL_COUNT=31 TOTAL_PAGES=7 -- felis.example iaculis.example ipsum.example justo.example lacus.example
COUNT=5 PAGE=3 PER_PAGE=5 TOTAL_COUNT=31 TOTAL_PAGES=7 -- lectus.example lobortis.example maximus.example morbi.example pharetra.example
COUNT=5 PAGE=4 PER_PAGE=5 TOTAL_COUNT=31 TOTAL_PAGES=7 -- porttitor.example potenti.example pretium.example purus.example quisque.example
COUNT=5 PAGE=5 PER_PAGE=5 TOTAL_COUNT=31 TOTAL_PAGES=7 -- sagittis.example semper.example sollicitudin.example suspendisse.example tortor.example
COUNT=1 PAGE=7 PER_PAGE=5 TOTAL_COUNT=31 TOTAL_PAGES=7 -- varius.example vehicula.example velit.example velit.example vitae.example
COUNT=5 PAGE=6 PER_PAGE=5 TOTAL_COUNT=31 TOTAL_PAGES=7 -- vivamus.example
DNSSEC CLI examples
~~~~~~~~~~~~~~~~~~~
.. code:: bash
$ cli4 /zones/:example.com/dnssec | jq -c '{"status":.status}'
{"status":"disabled"}
$
$ cli4 --patch status=active /zones/:example.com/dnssec | jq -c '{"status":.status}'
{"status":"pending"}
$
$ cli4 /zones/:example.com/dnssec
{
"algorithm": "13",
"digest": "41600621c65065b09230ebc9556ced937eb7fd86e31635d0025326ccf09a7194",
"digest_algorithm": "SHA256",
"digest_type": "2",
"ds": "example.com. 3600 IN DS 2371 13 2 41600621c65065b09230ebc9556ced937eb7fd86e31635d0025326ccf09a7194",
"flags": 257,
"key_tag": 2371,
"key_type": "ECDSAP256SHA256",
"modified_on": "2016-05-01T22:42:15.591158Z",
"public_key": "mdsswUyr3DPW132mOi8V9xESWE8jTo0dxCjjnopKl+GqJxpVXckHAeF+KkxLbxILfDLUT0rAK9iUzy1L53eKGQ==",
"status": "pending"
}
$
Zone file upload and download CLI examples (uses BIND format files)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Refer to `Import DNS
records <https://api.cloudflare.com/#dns-records-for-a-zone-import-dns-records>`__
on API documentation for this feature.
.. code:: bash
$ cat zone.txt
example.com. IN SOA somewhere.example.com. someone.example.com. (
2017010101
3H
15
1w
3h
)
record1.example.com. IN A 10.0.0.1
record2.example.com. IN AAAA 2001:d8b::2
record3.example.com. IN CNAME record1.example.com.
record4.example.com. IN TXT "some text"
$
$ cli4 --post file=@zone.txt /zones/:example.com/dns_records/import
{
"recs_added": 4,
"total_records_parsed": 4
}
$
The following is documented within the **Advanced** option of the DNS
page within the Cloudflare portal.
::
$ cli4 /zones/:example.com/dns_records/export | egrep -v '^;;|^$'
$ORIGIN .
@ 3600 IN SOA example.com. root.example.com. (
2025552311 ; serial
7200 ; refresh
3600 ; retry
86400 ; expire
3600) ; minimum
example.com. 300 IN NS REPLACE&ME$WITH^YOUR@NAMESERVER.
record4.example.com. 300 IN TXT "some text"
record3.example.com. 300 IN CNAME record1.example.com.
record1.example.com. 300 IN A 10.0.0.1
record2.example.com. 300 IN AAAA 2001:d8b::2
$
The egrep is used for documentation brevity.
This can also be done via Python code with the following example.
::
#!/usr/bin/env python
import sys
import CloudFlare
def main():
zone_name = sys.argv[1]
cf = CloudFlare.CloudFlare()
zones = cf.zones.get(params={'name': zone_name})
zone_id = zones[0]['id']
dns_records = cf.zones.dns_records.export.get(zone_id)
for l in dns_records.splitlines():
if len(l) == 0 or l[0] == ';':
continue
print l
exit(0)
if __name__ == '__main__':
main()
Cloudflare Workers
~~~~~~~~~~~~~~~~~~
Cloudflare Workers are described on the Cloudflare blog at
`here <https://blog.cloudflare.com/introducing-cloudflare-workers/>`__
and
`here <https://blog.cloudflare.com/code-everywhere-cloudflare-workers/>`__,
with the beta release announced
`here <https://blog.cloudflare.com/cloudflare-workers-is-now-on-open-beta/>`__.
The Python libraries now support the Cloudflare Workers API calls. The
following javascript is lifted from https://cloudflareworkers.com/ and
slightly modified.
::
$ cat modify-body.js
addEventListener("fetch", event => {
event.respondWith(fetchAndModify(event.request));
});
async function fetchAndModify(request) {
console.log("got a request:", request);
// Send the request on to the origin server.
const response = await fetch(request);
// Read response body.
const text = await response.text();
// Modify it.
const modified = text.replace(
"<body>",
"<body style=\"background: #ff0;\">");
// Return modified response.
return new Response(modified, {
status: response.status,
statusText: response.statusText,
headers: response.headers
});
}
$
Here's the website with it's simple ``<body>`` statement
::
$ curl -sS https://example.com/ | fgrep '<body'
<body>
$
Now lets add the script. Looking above, you will see that it's simple
action is to modify the ``<body>`` statement and make the background
yellow.
::
$ cli4 --put =@- /zones/:example.com/workers/script < modify-body.js
{
"etag": "1234567890123456789012345678901234567890123456789012345678901234",
"id": "example-com",
"modified_on": "2018-02-15T00:00:00.000000Z",
"script": "addEventListener(\"fetch\", event => {\n event.respondWith(fetchAndModify(event.request));\n});\n\nasync function fetchAndModify(request) {\n console.log(\"got a request:\", request);\n\n // Send the request on to the origin server.\n const response = await fetch(request);\n\n // Read response body.\n const text = await response.text();\n\n // Modify it.\n const modified = text.replace(\n \"<body>\",\n \"<body style=\\\"background: #ff0;\\\">\");\n\n // Return modified response.\n return new Response(modified, {\n status: response.status,\n statusText: response.statusText,\n headers: response.headers\n });\n}\n",
"size": 603
}
$
The following call checks that the script is associated with the zone.
In this case, it's the only script added by this user.
::
$ python3 -m cli4 /user/workers/scripts
[
{
"created_on": "2018-02-15T00:00:00.000000Z",
"etag": "1234567890123456789012345678901234567890123456789012345678901234",
"id": "example-com",
"modified_on": "2018-02-15T00:00:00.000000Z"
}
]
$
Next step is to make sure a route is added for that script on that zone.
::
$ cli4 --post pattern="example.com/*" script="example-com" /zones/:example.com/workers/routes
{
"id": "12345678901234567890123456789012"
}
$
$ cli4 /zones/:example.com/workers/routes
[
{
"id": "12345678901234567890123456789012",
"pattern": "example.com/*",
"script": "example-com"
}
]
$
With that script added to the zone and the route added, we can now see
the the website has been modified because of the Cloudflare Worker.
::
$ curl -sS https://example.com/ | fgrep '<body'
<body style="background: #ff0;">
$
All this can be removed; hence bringing the website back to its initial
state.
::
$ cli4 --delete /zones/:example.com/workers/script
12345678901234567890123456789012
$ cli4 --delete /zones/:example.com/workers/routes/:12345678901234567890123456789012
true
$
$ curl -sS https://example.com/ | fgrep '<body'
<body>
$
Refer to the Cloudflare Workers API documentation for more information.
Implemented API calls
---------------------
The **--dump** argument to cli4 will produce a list of all the call
implemented within the library.
.. code:: bash
$ cli4 --dump
/certificates
/ips
/organizations
...
/zones/ssl/analyze
/zones/ssl/certificate_packs
/zones/ssl/verification
$
Table of commands
~~~~~~~~~~~~~~~~~
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | ``PUT`` | ``POST`` | ``PATCH`` | ``DELETE`` | API call |
+===========+===========+============+=============+==============+===============================================================+
| ``GET`` | | ``POST`` | | ``DELETE`` | /certificates |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /ips |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /organizations |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | ``POST`` | ``PATCH`` | ``DELETE`` | /organizations/:identifier/firewall/access\_rules/rules |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| | | | ``PATCH`` | | /organizations/:identifier/invite |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | ``POST`` | | ``DELETE`` | /organizations/:identifier/invites |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | ``DELETE`` | /organizations/:identifier/members |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | ``POST`` | ``PATCH`` | ``DELETE`` | /organizations/:identifier/railguns |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /organizations/:identifier/railguns/:identifier/zones |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /organizations/:identifier/roles |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | ``POST`` | ``PATCH`` | ``DELETE`` | /organizations/:identifier/virtual\_dns |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | ``POST`` | ``PATCH`` | ``DELETE`` | /railguns |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /railguns/:identifier/zones |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /user |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /user/billing/history |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /user/billing/profile |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /user/billing/subscriptions/apps |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /user/billing/subscriptions/zones |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | ``POST`` | ``PATCH`` | ``DELETE`` | /user/firewall/access\_rules/rules |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /user/invites |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | ``DELETE`` | /user/organizations |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | ``POST`` | ``PATCH`` | ``DELETE`` | /user/virtual\_dns |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | ``POST`` | ``PATCH`` | ``DELETE`` | /zones |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| | ``PUT`` | | | | /zones/:identifier/activation\_check |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /zones/:identifier/analytics/colos |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /zones/:identifier/analytics/dashboard |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /zones/:identifier/available\_plans |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| | ``PUT`` | | | | /zones/:identifier/custom\_certificates/prioritize |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | ``POST`` | ``PATCH`` | ``DELETE`` | /zones/:identifier/custom\_certificates |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | ``PUT`` | | | | /zones/:identifier/custom\_pages |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | ``PUT`` | ``POST`` | | ``DELETE`` | /zones/:identifier/dns\_records |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/firewall/waf/packages/:identifier/groups |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/firewall/waf/packages/:identifier/rules |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/firewall/waf/packages |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | ``POST`` | ``PATCH`` | ``DELETE`` | /zones/:identifier/firewall/access\_rules/rules |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | ``POST`` | ``PATCH`` | ``DELETE`` | /zones/:identifier/keyless\_certificates |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | ``PUT`` | ``POST`` | ``PATCH`` | ``DELETE`` | /zones/:identifier/pagerules |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| | | | | ``DELETE`` | /zones/:identifier/purge\_cache |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /zones/:identifier/railguns/:identifier/diagnose |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/railguns |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | | | /zones/:identifier/settings/advanced\_ddos |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/always\_online |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/browser\_cache\_ttl |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/browser\_check |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/cache\_level |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/challenge\_ttl |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/development\_mode |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/email\_obfuscation |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/hotlink\_protection |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/ip\_geolocation |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/ipv6 |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/minify |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/mirage |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/mobile\_redirect |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/origin\_error\_page\_pass\_thru |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/polish |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/prefetch\_preload |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/response\_buffering |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/rocket\_loader |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/security\_header |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/security\_level |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/server\_side\_exclude |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/sort\_query\_string\_for\_cache |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/ssl |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/tls\_1\_2\_only |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/tls\_client\_auth |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/true\_client\_ip\_header |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
| ``GET`` | | | ``PATCH`` | | /zones/:identifier/settings/waf |
+-----------+-----------+------------+-------------+--------------+---------------------------------------------------------------+
Adding extra API calls manually
-------------------------------
Extra API calls can be added via the configuration file
.. code:: bash
$ cat ~/.cloudflare/cloudflare.cfg
[CloudFlare]
extras =
/client/v4/command
/client/v4/command/:command_identifier
/client/v4/command/:command_identifier/settings
$
While it's easy to call anything within Cloudflare's API, it's not very
useful to add items in here as they will simply return API URL errors.
Technically, this is only useful for internal testing within Cloudflare.
Issues
------
The following error can be caused by an out of date SSL/TLS library
and/or out of date Python.
::
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
The solution can be found
`here <https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning>`__
and/or
`here <http://stackoverflow.com/questions/35144550/how-to-install-cryptography-on-ubuntu>`__.
Python 2.x vs 3.x support
-------------------------
As of May/June 2016 the code is now tested against pylint. This was
required in order to move the codebase into Python 3.x. The motivation
for this came from `Danielle Madeley
(danni) <https://github.com/danni>`__.
While the codebase has been edited to run on Python 3.x, there's not
been enough Python 3.x testing performed. If you can help in this
regard; please contact the maintainers.
Credit
------
This is based on work by `Felix Wong
(gnowxilef) <https://github.com/gnowxilef>`__ found
`here <https://github.com/cloudflare-api/python-cloudflare-v4>`__. It
has been seriously expanded upon.
Copyright
---------
Portions copyright `Felix Wong
(gnowxilef) <https://github.com/gnowxilef>`__ 2015 and Cloudflare 2016.
Keywords: cloudflare
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
|