Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit 8f2e7ad

Browse files
committed
Add version 3.0 code and pinning info to README
1 parent b4dbc6e commit 8f2e7ad

File tree

1 file changed

+55
-27
lines changed

1 file changed

+55
-27
lines changed

README.md

+55-27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# cloudflare-python
22

3+
> [!WARNING]
4+
> Soon there will be two Python packages for accessing Cloudflare's API.
5+
>
6+
> 1. This original [package](https://github.com/cloudflare/python-cloudflare), which was initially introduced [here](https://blog.cloudflare.com/python-cloudflare/).
7+
> 2. A ground-up rewrite of the SDK, released under `3.x`, at some point in the future. See [here](https://github.com/cloudflare/python-cloudflare/discussions/191)
8+
>
9+
> If you like using this package in it's present form, it is highly recommended that you pin to the `2.x` releases now.
10+
>
11+
> ```bash
12+
> $ cat ${YOUR_PROJECT}/requirements.txt
13+
> cloudflare==2.19.*
14+
> $
15+
> ```
16+
>
17+
> For manual upgrades; the following will work cleanly:
18+
> ```bash
19+
> $ pip install --upgrade cloudflare==2.19.*
20+
> ...
21+
> Successfully installed cloudflare-2.19.3
22+
> $
23+
24+
> [!WARNING]
25+
> Release `3.x` will not be code-compatible/call-compatible with previous releases (i.e. release `1.x` and `2.x`).
26+
27+
When you see this README complete change you will know that `3.x` has been released; however, until then, this code will be released under a `2.19.x` release number.
28+
29+
## Package stats
30+
31+
[![Downloads](https://static.pepy.tech/badge/cloudflare)](https://pepy.tech/project/cloudflare)
32+
[![Downloads](https://static.pepy.tech/badge/cloudflare/month)](https://pepy.tech/project/cloudflare)
33+
[![Downloads](https://static.pepy.tech/badge/cloudflare/week)](https://pepy.tech/project/cloudflare)
34+
[![Downloads](https://static.pepy.tech/badge/cloudflare/week)](https://pepy.tech/project/cloudflare)
35+
[![Downloads](https://img.shields.io/pypi/pyversions/cloudflare.svg)](https://pepy.tech/project/cloudflare)
36+
337
## Installation
438
539
Two methods are provided to install this software.
@@ -8,26 +42,20 @@ Use PyPi (see [package](https://pypi.python.org/pypi/cloudflare) details) or Git
842
### Via PyPI
943
1044
```bash
11-
$ sudo pip install cloudflare
12-
$
45+
$ sudo pip install cloudflare
46+
$
1347
```
1448
1549
Yes - that simple! (the sudo may not be needed in some cases).
1650
17-
[![Downloads](https://static.pepy.tech/badge/cloudflare)](https://pepy.tech/project/cloudflare)
18-
[![Downloads](https://static.pepy.tech/badge/cloudflare/month)](https://pepy.tech/project/cloudflare)
19-
[![Downloads](https://static.pepy.tech/badge/cloudflare/week)](https://pepy.tech/project/cloudflare)
20-
[![Downloads](https://static.pepy.tech/badge/cloudflare/week)](https://pepy.tech/project/cloudflare)
21-
[![Downloads](https://img.shields.io/pypi/pyversions/cloudflare.svg)](https://pepy.tech/project/cloudflare)
22-
2351
### Via github
2452
2553
```bash
26-
$ git clone https://github.com/cloudflare/python-cloudflare
27-
$ cd python-cloudflare
28-
$ ./setup.py build
29-
$ sudo ./setup.py install
30-
$
54+
$ git clone https://github.com/cloudflare/python-cloudflare
55+
$ cd python-cloudflare
56+
$ ./setup.py build
57+
$ sudo ./setup.py install
58+
$
3159
```
3260
3361
Or whatever variance of that you want to use.
@@ -214,26 +242,26 @@ If you are using only the API Token, then don't include the API Email. If you ar
214242
```python
215243
import CloudFlare
216244
217-
# A minimal call - reading values from environment variables or configuration file
218-
cf = CloudFlare.CloudFlare()
245+
# A minimal call - reading values from environment variables or configuration file
246+
cf = CloudFlare.CloudFlare()
219247
220-
# A minimal call with debug enabled
221-
cf = CloudFlare.CloudFlare(debug=True)
248+
# A minimal call with debug enabled
249+
cf = CloudFlare.CloudFlare(debug=True)
222250
223-
# An authenticated call using an API Token (note the missing email)
224-
cf = CloudFlare.CloudFlare(token='00000000000000000000000000000000')
251+
# An authenticated call using an API Token (note the missing email)
252+
cf = CloudFlare.CloudFlare(token='00000000000000000000000000000000')
225253
226-
# An authenticated call using an API Email and API Key
227-
cf = CloudFlare.CloudFlare(email='[email protected]', key='00000000000000000000000000000000')
254+
# An authenticated call using an API Email and API Key
255+
cf = CloudFlare.CloudFlare(email='[email protected]', key='00000000000000000000000000000000')
228256
229-
# An authenticated call using an API Token and CA-Origin info
230-
cf = CloudFlare.CloudFlare(token='00000000000000000000000000000000', certtoken='v1.0-...')
257+
# An authenticated call using an API Token and CA-Origin info
258+
cf = CloudFlare.CloudFlare(token='00000000000000000000000000000000', certtoken='v1.0-...')
231259
232-
# An authenticated call using an API Email, API Key, and CA-Origin info
233-
cf = CloudFlare.CloudFlare(email='[email protected]', key='00000000000000000000000000000000', certtoken='v1.0-...')
260+
# An authenticated call using an API Email, API Key, and CA-Origin info
261+
cf = CloudFlare.CloudFlare(email='[email protected]', key='00000000000000000000000000000000', certtoken='v1.0-...')
234262
235-
# An authenticated call using using a stored profile (see below)
236-
cf = CloudFlare.CloudFlare(profile="CompanyX"))
263+
# An authenticated call using using a stored profile (see below)
264+
cf = CloudFlare.CloudFlare(profile="CompanyX"))
237265
```
238266
239267
If the account email and API key are not passed when you create the class, then they are retrieved from either the users exported shell environment variables or the .cloudflare.cfg or ~/.cloudflare.cfg or ~/.cloudflare/cloudflare.cfg files, in that order.

0 commit comments

Comments
 (0)