Skip to content

Commit f18eb39

Browse files
committed
Update README.md
Update `README.md`: - Add title image. - Add badges and update styling. - Improve code example to show more features. Signed-off-by: Roald Nefs <info@roaldnefs.com>
1 parent 7f42f5e commit f18eb39

2 files changed

Lines changed: 23 additions & 12 deletions

File tree

README.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
1-
# python-transip
1+
[![python-transip](https://github.com/roaldnefs/python-transip/blob/main/logo.png?raw=true)](https://github.com/roaldnefs/python-transip)
2+
3+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-transip?color=187dc1&logo=python&logoColor=white&style=for-the-badge)](https://pypi.org/project/python-transip/)
4+
[![PyPI - Downloads](https://img.shields.io/pypi/dm/python-transip?color=187dc1&logo=python&logoColor=white&style=for-the-badge)](https://pypi.org/project/python-transip/)
5+
[![PyPI - Format](https://img.shields.io/pypi/format/python-transip?color=187dc1&logo=python&logoColor=white&style=for-the-badge)](https://pypi.org/project/python-transip/)
6+
[![License](https://img.shields.io/github/license/roaldnefs/python-transip?color=187dc1&style=for-the-badge)](https://raw.githubusercontent.com/roaldnefs/python-transip/main/COPYING)
7+
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/roaldnefs/python-transip/tests?color=187dc1&label=CI&logo=github&style=for-the-badge)](https://github.com/roaldnefs/python-transip/actions)
8+
[![GitHub contributors](https://img.shields.io/github/contributors/roaldnefs/python-transip?color=187dc1&logo=github&style=for-the-badge)](https://github.com/roaldnefs/python-transip/graphs/contributors)
29

310
**python-transip** is an Python wrapper for the TransIP REST API.
411

512
```python
6-
>>> from transip import TransIP
7-
>>> client = TransIP(access_token="REDACTED")
8-
>>> domains = client.domains.list()
9-
>>> domain = domains[0]
10-
>>> domain.registrationDate
11-
'2011-04-29'
13+
>>> import transip
14+
# Initialize a TransIP API client
15+
>>> client = transip.TransIP(access_token="TOKEN")
16+
# Retrieve a list of VPSs
17+
>>> for vps in client.vpss.list():
18+
... print(vps)
19+
<class 'transip.v6.services.vps.Vps'> => {'name': 'transipdemo-vps', 'productName': 'vps-bladevps-x1', ... }
20+
# Retrieve a domain and list its DNS-records
21+
>>> domain = client.domains.get('transipdemo.net')
22+
>>> for entry in domain.dns.list():
23+
... print(entry)
24+
<class 'transip.v6.services.domain.DnsEntry'> => {'name': '*', 'expire': 300, 'type': 'A', 'content': '95.170.70.223'}
25+
<class 'transip.v6.services.domain.DnsEntry'> => {'name': '@', 'expire': 300, 'type': 'A', 'content': '95.170.70.223'}
26+
# Add a new DNS-record
27+
>>> domain.dns.create({'name': '@', 'expire': 300, 'type': 'TXT', 'content': 'Python'})
1228
```
1329

14-
[![CI Tests](https://github.com/roaldnefs/python-transip/workflows/tests/badge.svg?event=push)](https://github.com/roaldnefs/python-transip/actions)
15-
[![Downloads](https://pepy.tech/badge/python-transip/month)](https://pepy.tech/project/python-transip/month)
16-
[![Supported Versions](https://img.shields.io/pypi/pyversions/python-transip.svg)](https://pypi.org/project/python-transip)
17-
[![Contributors](https://img.shields.io/github/contributors/roaldnefs/python-transip.svg)](https://github.com/roaldnefs/python-transip/graphs/contributors)
18-
1930
## Installing python-transip and Supported Versions
2031

2132
**python-transip** is available on PyPI:

logo.png

193 KB
Loading

0 commit comments

Comments
 (0)