Skip to content

Fix spelling #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ Changelog
- [docuumentation] add service list example
- [documentation] add expiring service list example
- [documentation] add dedicated server KVM example
- [documentation] explicitely list supported python version
- [documentation] explicitly list supported python version

## 0.3.5 (2015-07-30)

- [enhancement] API call timeouts. Defaults to 180s
- [buildsystem] move to new Travis build system
- [documentation] send complex / python keywork parameters
- [documentation] send complex / python keyword parameters

## 0.3.4 (2015-06-10)

Expand Down
8 changes: 4 additions & 4 deletions MIGRATION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Migrate from legacy wrappers
############################

This guide specifically targets developers comming from the legacy wrappers
This guide specifically targets developers coming from the legacy wrappers
previously distributed on https://api.ovh.com/g934.first_step_with_api. It
highligts the main evolutions between these 2 major version as well as some
highlights the main evolutions between these 2 major version as well as some
tips to help with the migration. If you have any further questions, feel free
to drop a mail on [email protected] ([email protected] to subscribe).

Expand Down Expand Up @@ -50,7 +50,7 @@ New method:

from ovh import Client

Instanciate a new client
Instantiate a new client
------------------------

Legacy method:
Expand Down Expand Up @@ -102,7 +102,7 @@ And then simply create a client instance:

With no additional boilerplate!

For more informations on available configuration mechanism, please see
For more information on available configuration mechanism, please see
https://github.com/ovh/python-ovh/blob/master/README.rst#configuration

Use the client
Expand Down
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Depending on the API you want to use, you may set the ``endpoint`` to:
See Configuration_ for more information on available configuration mechanisms.

.. note:: When using a versioning system, make sure to add ``ovh.conf`` to ignored
files. It contains confidential/security-sensitive informations!
files. It contains confidential/security-sensitive information!

3. Authorize your application to access a customer account
**********************************************************
Expand All @@ -127,7 +127,7 @@ To allow your application to access a customer account using the API on your
behalf, you need a **consumer key (CK)**.

Here is a sample code you can use to allow your application to access a
customer's informations:
customer's information:

.. code:: python

Expand Down Expand Up @@ -170,10 +170,10 @@ e-mail redirections may be freely configured on domains and DNS zones hosted by
OVH to an arbitrary destination e-mail using API call
``POST /email/domain/{domain}/redirection``.

For this call, the api specifies that the source adress shall be given under the
For this call, the api specifies that the source address shall be given under the
``from`` keyword. Which is a problem as this is also a reserved Python keyword.
In this case, simply prefix it with a '_', the wrapper will automatically detect
it as being a prefixed reserved keyword and will subsitute it. Such aliasing
it as being a prefixed reserved keyword and will substitute it. Such aliasing
is only supported with reserved keywords.

.. code:: python
Expand Down Expand Up @@ -393,7 +393,7 @@ Alternatively it is suggested to use configuration files or environment
variables so that the same code may run seamlessly in multiple environments.
Production and development for instance.

This wrapper will first look for direct instanciation parameters then
This wrapper will first look for direct instantiation parameters then
``OVH_ENDPOINT``, ``OVH_APPLICATION_KEY``, ``OVH_APPLICATION_SECRET`` and
``OVH_CONSUMER_KEY`` environment variables. If either of these parameter is not
provided, it will look for a configuration file of the form:
Expand Down Expand Up @@ -490,7 +490,7 @@ case of error.
In some rare scenario, advanced setups, you may need to perform customer
processing on the raw request response. It may be accessed via ``raw_call()``.
This is the lowest level call in ``python-ovh``. See the source for more
informations.
information.

Hacking
=======
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ovh/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ below for a full working example or :py:class:`ConsumerKeyRequest`
for dertailed implementatation.

The basic idea of ``ConsumerKeyRequest`` is to generate appropriate
autorization requests from human readable function calls. In short:
authorization requests from human readable function calls. In short:
use it!

.. automethod:: Client.new_consumer_key_request
Expand Down
10 changes: 5 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Depending on the API you want to use, you may set the ``endpoint`` to:
See Configuration_ for more inforamtions on available configuration mechanisms.

.. note:: When using a versioning system, make sure to add ``ovh.conf`` to ignored
files. It contains confidential/security-sensitive informations!
files. It contains confidential/security-sensitive information!

3. Authorize your application to access a customer account
**********************************************************
Expand Down Expand Up @@ -154,10 +154,10 @@ e-mail redirections may be freely configured on domains and DNS zones hosted by
OVH to an arbitrary destination e-mail using API call
``POST /email/domain/{domain}/redirection``.

For this call, the api specifies that the source adress shall be given under the
For this call, the api specifies that the source address shall be given under the
``from`` keyword. Which is a problem as this is also a reserved Python keyword.
In this case, simply prefix it with a '_', the wrapper will automatically detect
it as being a prefixed reserved keyword and will subsitute it. Such aliasing
it as being a prefixed reserved keyword and will substitute it. Such aliasing
is only supported with reserved keywords.

.. code:: python
Expand Down Expand Up @@ -299,7 +299,7 @@ Alternatively it is suggested to use configuration files or environment
variables so that the same code may run seamlessly in multiple environments.
Production and development for instance.

This wrapper will first look for direct instanciation parameters then
This wrapper will first look for direct instantiation parameters then
``OVH_ENDPOINT``, ``OVH_APPLICATION_KEY``, ``OVH_APPLICATION_SECRET`` and
``OVH_CONSUMER_KEY`` environment variables. If either of these parameter is not
provided, it will look for a configuration file of the form:
Expand Down Expand Up @@ -378,7 +378,7 @@ case of error.
In some rare scenario, advanced setups, you may need to perform customer
processing on the raw request response. It may be accessed via ``raw_call()``.
This is the lowest level call in ``python-ovh``. See the source for more
informations.
information.

Hacking
=======
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ application_secret=my_application_secret
consumer_key=my_consumer_key
```

Be warned, this token is only valid to get informations of your OVH services. You cannot changes or delete your products with it.
Be warned, this token is only valid to get information of your OVH services. You cannot changes or delete your products with it.
If you need a more generic token, you may adjust the **Rights** fields at your needs.

## Download the script
Expand Down
2 changes: 1 addition & 1 deletion examples/serviceExpiration/serviceThatWillExpired.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
for service_type in service_types:
service_list = client.get('/%s' % service_type )

# If we found you have this one or more of this product, we get these informations
# If we found you have this one or more of this product, we get these information
for service in service_list:
service_infos = client.get('/%s/%s/serviceInfos' % (service_type, service) )
service_expiration_date = datetime.datetime.strptime(service_infos['expiration'], '%Y-%m-%d')
Expand Down
2 changes: 1 addition & 1 deletion examples/serviceList/api_get_service_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ application_secret=my_application_secret
consumer_key=my_consumer_key
```

Be warned, this token is only valid to get informations of your OVH services. You cannot changes or delete your products with it.
Be warned, this token is only valid to get information of your OVH services. You cannot changes or delete your products with it.
If you need a more generic token, you may adjust the **Rights** fields at your needs.

## Download the script
Expand Down
2 changes: 1 addition & 1 deletion examples/serviceList/serviceList.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
for service_type in service_types:
service_list = client.get('/%s' % service_type )

# If we found you have this one or more of this product, we get these informations
# If we found you have this one or more of this product, we get these information
for service in service_list:
service_infos = client.get('/%s/%s/serviceInfos' % (service_type, service) )
service_expiration_date = datetime.datetime.strptime(service_infos['expiration'], '%Y-%m-%d')
Expand Down
14 changes: 7 additions & 7 deletions ovh/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
from .vendor.requests.exceptions import RequestException

# Disable pyopenssl. It breaks SSL connection pool when SSL connection is
# closed unexpetedly by the server. And we don't need SNI anyway.
# closed unexpectedly by the server. And we don't need SNI anyway.
try:
from .vendor.requests.packages.urllib3.contrib import pyopenssl
pyopenssl.extract_from_urllib3()
Expand Down Expand Up @@ -133,7 +133,7 @@ def __init__(self, endpoint=None, application_key=None,
or ``consumer_key`` is not provided, this client will attempt to locate
from them from environment, ~/.ovh.cfg or /etc/ovh.cfg.

See :py:mod:`ovh.config` for more informations on supported
See :py:mod:`ovh.config` for more information on supported
configuration mechanisms.

``timeout`` can either be a float or a tuple. If it is a float it
Expand Down Expand Up @@ -161,7 +161,7 @@ def __init__(self, endpoint=None, application_key=None,
try:
self._endpoint = ENDPOINTS[endpoint]
except KeyError:
raise InvalidRegion("Unknow endpoint %s. Valid endpoints: %s",
raise InvalidRegion("Unknown endpoint %s. Valid endpoints: %s",
endpoint, ENDPOINTS.keys())

# load keys
Expand Down Expand Up @@ -236,7 +236,7 @@ def request_consumerkey(self, access_rules, redirect_url=None):
will return a ``consumerKey`` and a ``validationUrl``. The end user must
visit the ``validationUrl``, authenticate and validate the requested
``access_rules`` to link his account to the ``consumerKey``. Once this
is done, he may optionaly be redirected to ``redirect_url`` and the
is done, he may optionally be redirected to ``redirect_url`` and the
application can start using the ``consumerKey``.

The new ``consumerKey`` is automatically loaded into
Expand Down Expand Up @@ -329,7 +329,7 @@ def get(self, _target, _need_auth=True, **kwargs):
'GET' :py:func:`Client.call` wrapper.

Query string parameters can be set either directly in ``_target`` or as
keywork arguments. If an argument collides with a Python reserved
keyword arguments. If an argument collides with a Python reserved
keyword, prefix it with a '_'. For instance, ``from`` becomes ``_from``.

:param string _target: API method to call
Expand All @@ -350,7 +350,7 @@ def put(self, _target, _need_auth=True, **kwargs):
"""
'PUT' :py:func:`Client.call` wrapper

Body parameters can be set either directly in ``_target`` or as keywork
Body parameters can be set either directly in ``_target`` or as keyword
arguments. If an argument collides with a Python reserved keyword,
prefix it with a '_'. For instance, ``from`` becomes ``_from``.

Expand All @@ -365,7 +365,7 @@ def post(self, _target, _need_auth=True, **kwargs):
"""
'POST' :py:func:`Client.call` wrapper

Body parameters can be set either directly in ``_target`` or as keywork
Body parameters can be set either directly in ``_target`` or as keyword
arguments. If an argument collides with a Python reserved keyword,
prefix it with a '_'. For instance, ``from`` becomes ``_from``.

Expand Down
2 changes: 1 addition & 1 deletion ovh/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
variables so that the same code may run seamlessly in multiple environments.
Production and development for instance.

This wrapper will first look for direct instanciation parameters then
This wrapper will first look for direct instantiation parameters then
``OVH_ENDPOINT``, ``OVH_APPLICATION_KEY``, ``OVH_APPLICATION_SECRET`` and
``OVH_CONSUMER_KEY`` environment variables. If either of these parameter is not
provided, it will look for a configuration file of the form:
Expand Down
4 changes: 2 additions & 2 deletions ovh/consumer_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

"""
This module provides a consumer key creation helper. Consumer keys are linked
with permissions defining whicg endpoint they are allowed to call. Just like
with permissions defining which endpoint they are allowed to call. Just like
a physical key can unlock some doors but not others.

OVH API consumer keys authorization is pattern based. This makes it extremely
Expand Down Expand Up @@ -65,7 +65,7 @@ def __init__(self, client):
def request(self, redirect_url=None):
'''
Create the consumer key with the configures autorizations. The user will
need to validate it befor it can be used with the API
need to validate it before it can be used with the API

>>> ck.request()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def setUp(self):
config.CONFIG_PATH = M_CONFIG_PATH

def tearDown(self):
"""Restore configuraton lookup path"""
"""Restore configuration lookup path"""
config.CONFIG_PATH = self._orig_CONFIG_PATH

def test_real_lookup_path(self):
Expand Down