Skip to content

Commit 641f563

Browse files
authored
Merge pull request #85 from exonet/rja/readme-markdown
Update and rename README.rst to README.md
2 parents 3488e43 + fe73b19 commit 641f563

File tree

3 files changed

+165
-100
lines changed

3 files changed

+165
-100
lines changed

LICENSE.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# The MIT License (MIT)
22

3-
Copyright (c) 2022 Exonet <[email protected]>
3+
Copyright (c) 2020-2023 Exonet BV
44

5-
> Permission is hereby granted, free of charge, to any person obtaining a copy
6-
> of this software and associated documentation files (the "Software"), to deal
7-
> in the Software without restriction, including without limitation the rights
8-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
> copies of the Software, and to permit persons to whom the Software is
10-
> furnished to do so, subject to the following conditions:
11-
>
12-
> The above copyright notice and this permission notice shall be included in
13-
> all copies or substantial portions of the Software.
14-
>
15-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
> THE SOFTWARE.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# exonetapi
2+
Python 3 library for the Exonet API.
3+
4+
[![Latest Version on Packagist][ico-version]][link-pypi]
5+
[![Python Versions][ico-pyversions]][link-pypi]
6+
[![Software License][ico-license]](LICENSE.md)
7+
8+
## Install
9+
Install using pip:
10+
11+
```bash
12+
pip install exonetapi
13+
```
14+
15+
## Usage
16+
Example to get the user details of the authorised user:
17+
18+
```py
19+
from exonetapi import Client
20+
21+
# Create a new Client.
22+
client = Client('https://api.exonet.nl')
23+
24+
# Authorize with a personal access token.
25+
client.authenticator.set_token('<YOUR_TOKEN>')
26+
27+
# Make an API call. Get details of the authorized user.
28+
user_details = client.resource('me').get()
29+
30+
# Print user's name.
31+
print('Autorized as: {name}'.format(
32+
name=user_details.attribute('name')
33+
))
34+
```
35+
36+
See the `/docs` directory for complete documentation and additional code snippets.
37+
38+
## Examples
39+
40+
The `/examples` directory contains ready to use scripts to help you get started. These examples can be executed with your personal access token. One of them gets a ticket with it's emails and prints the details::
41+
42+
```
43+
$ python examples/ticket_details.py <YOUR-TOKEN>
44+
```
45+
This should make two API calls and print the ticket and email details for one of your tickets.
46+
47+
## Change log
48+
49+
Please see [releases][link-releases] for more information on what has changed recently.
50+
51+
# Contributing
52+
53+
When contributing to this repository, please first discuss the change you wish
54+
to make via issue, email, or any other method with the owners of this repository
55+
before making a change.
56+
57+
Please note we have a code of conduct, please follow it in all your interactions
58+
with the project.
59+
60+
### Issues and feature requests
61+
62+
You've found a bug in the source code, a mistake in the documentation or maybe
63+
you'd like a new feature? You can help us by submitting an issue to our
64+
[GitHub Repository][github]. Before you create an issue, make sure you search
65+
the archive, maybe your question was already answered.
66+
67+
Even better: You could submit a pull request with a fix / new feature!
68+
69+
### Pull request process
70+
71+
1. Search our repository for open or closed [pull requests][prs] that relates
72+
to your submission. You don't want to duplicate effort.
73+
74+
2. You may merge the pull request in once you have the sign-off of two other
75+
developers, or if you do not have permission to do that, you may request
76+
the second reviewer to merge it for you.
77+
78+
## Setting up development environment
79+
80+
This Python project is fully managed using the [Poetry][poetry] dependency
81+
manager.
82+
83+
You need at least:
84+
85+
- Python 3.8+
86+
- [Poetry][poetry-install]
87+
88+
Install all packages, including all development requirements:
89+
90+
```bash
91+
poetry install
92+
```
93+
94+
Poetry creates by default an virtual environment where it installs all
95+
necessary pip packages, to enter or exit the venv run the following commands:
96+
97+
```bash
98+
poetry shell
99+
exit
100+
```
101+
102+
*Now you're all set to get started!*
103+
104+
To run the Python tests:
105+
106+
```bash
107+
poetry run pytest
108+
```
109+
110+
To run the bandit checks:
111+
112+
```bash
113+
poetry run bandit
114+
```
115+
116+
117+
## Security
118+
119+
If you discover any security related issues please email [[email protected]](mailto:[email protected]) instead
120+
of using the issue tracker.
121+
122+
123+
## Credits
124+
125+
- [Exonet][link-author]
126+
- [All Contributors][link-contributors]
127+
128+
129+
## License
130+
131+
[MIT License](LICENSE.md)
132+
133+
[ico-version]: https://img.shields.io/pypi/v/exonetapi.svg?style=flat-square
134+
[ico-license]: https://img.shields.io/pypi/l/exonetapi.svg?style=flat-square
135+
[ico-pyversions]: https://img.shields.io/pypi/pyversions/exonetapi.svg?style=flat-square
136+
137+
[github]: https://github.com/exonet/exonet-api-python/issues
138+
[prs]: https://github.com/exonet/exonet-api-python/pulls
139+
140+
[link-pypi]: https://pypi.org/project/exonetapi/
141+
[link-author]: https://github.com/exonet
142+
[link-releases]: https://github.com/exonet/exonet-api-python/releases
143+
[link-contributors]: ../../contributors
144+
145+
[poetry-install]: https://python-poetry.org/docs/#installation
146+
[poetry]: https://python-poetry.org
147+
[pre-commit]: https://pre-commit.com

README.rst

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)