Skip to content

Commit 401064a

Browse files
committed
Minor fixes, move project settings section down in overview
1 parent 290664c commit 401064a

File tree

3 files changed

+31
-28
lines changed

3 files changed

+31
-28
lines changed

docs/client/overview.rst

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ for access to client projects.
2020
Projects
2121
--------
2222

23-
You can list the projects available to your account::
23+
You can list the :class:`~scrapinghub.client.projects.Projects` available to your
24+
account::
2425

2526
>>> client.projects.list()
2627
[123, 456]
@@ -67,31 +68,6 @@ For example, to schedule a spider run (it returns a
6768
<scrapinghub.client.Job at 0x106ee12e8>>
6869

6970

70-
Settings
71-
--------
72-
73-
You can work with project settings via :class:`~scrapinghub.client.projects.Settings`.
74-
75-
To get a list of the project settings::
76-
77-
>>> project.settings.list()
78-
[(u'default_job_units', 2), (u'job_runtime_limit', 24)]]
79-
80-
To get a project setting value by name::
81-
82-
>>> project.settings.get('job_runtime_limit')
83-
24
84-
85-
To update a project setting value by name::
86-
87-
>>> project.settings.set('job_runtime_limit', 20)
88-
89-
Or update a few project settings at once::
90-
91-
>>> project.settings.update({'default_job_units': 1,
92-
... 'job_runtime_limit': 20})
93-
94-
9571
Spiders
9672
-------
9773

@@ -428,6 +404,30 @@ Or post multiple events at once::
428404
>>> project.activity.add(events)
429405

430406

407+
Settings
408+
--------
409+
410+
You can work with project settings via :class:`~scrapinghub.client.projects.Settings`.
411+
412+
To get a list of the project settings::
413+
414+
>>> project.settings.list()
415+
[(u'default_job_units', 2), (u'job_runtime_limit', 24)]]
416+
417+
To get a project setting value by name::
418+
419+
>>> project.settings.get('job_runtime_limit')
420+
24
421+
422+
To update a project setting value by name::
423+
424+
>>> project.settings.set('job_runtime_limit', 20)
425+
426+
Or update a few project settings at once::
427+
428+
>>> project.settings.update({'default_job_units': 1,
429+
... 'job_runtime_limit': 20})
430+
431431

432432
Collections
433433
-----------

docs/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ By default, tests use VCR.py ``once`` mode to:
6969
It means that if you add new integration tests and run all tests as usual,
7070
only new cassettes will be created, all existing cassettes will stay unmodified.
7171

72-
To ignore existing cassettes and use real service, please provide a flag::
72+
To ignore existing cassettes and use real services, please provide a flag::
7373

7474
py.test --ignore-cassettes
7575

scrapinghub/client/proxy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ def get(self, key, **params):
6262
return self._origin.get(key, **params)
6363

6464
def write(self, item):
65-
"""Write new element to collection."""
65+
"""Write new element to collection.
66+
67+
:param item: element data dict to write.
68+
"""
6669
try:
6770
return self._origin.write(item)
6871
except _ValueTooLarge as exc:

0 commit comments

Comments
 (0)