Skip to content

Commit

Permalink
update documentation after b2sdk._internal change
Browse files Browse the repository at this point in the history
  • Loading branch information
mjurbanski-reef committed Mar 28, 2024
1 parent 47ed528 commit 7929fe5
Show file tree
Hide file tree
Showing 42 changed files with 93 additions and 98 deletions.
10 changes: 5 additions & 5 deletions doc/source/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Concatenate files of known size
... ]
>>> file_info = {'how': 'good-file'}
>>> bucket.concatenate(input_sources, remote_name, file_info)
<b2sdk.file_version.FileVersion at 0x7fc8cd560551>
<b2sdk._internal.file_version.FileVersion at 0x7fc8cd560551>
If one of remote source has length smaller than :term:`absoluteMinimumPartSize` then it cannot be copied into large file part. Such remote source would be downloaded and concatenated locally with local source or with other downloaded remote source.

Expand All @@ -99,7 +99,7 @@ Concatenate files of known size (streamed version)
... ]
>>> file_info = {'how': 'good-file'}
>>> bucket.concatenate_stream(input_sources, remote_name, file_info)
<b2sdk.file_version.FileVersion at 0x7fc8cd560551>
<b2sdk._internal.file_version.FileVersion at 0x7fc8cd560551>
Expand Down Expand Up @@ -148,7 +148,7 @@ The assumption here is that the file has been appended to since it was last uplo
... ]
>>> file_info = {'how': 'good-file'}
>>> bucket.create_file(input_sources, remote_name, file_info)
<b2sdk.file_version.FileVersion at 0x7fc8cd560552>
<b2sdk._internal.file_version.FileVersion at 0x7fc8cd560552>
`LocalUploadSource` has the size determined automatically in this case. This is more efficient than :meth:`b2sdk.v2.Bucket.concatenate`, as it can use the overlapping ranges when a remote part is smaller than :term:`absoluteMinimumPartSize` to prevent downloading a range (when concatenating, local source would have destination offset at the end of remote source)

Expand Down Expand Up @@ -177,7 +177,7 @@ Change the middle of the remote file
... ]
>>> file_info = {'how': 'good-file'}
>>> bucket.create_file(input_sources, remote_name, file_info)
<b2sdk.file_version.FileVersion at 0x7fc8cd560552>
<b2sdk._internal.file_version.FileVersion at 0x7fc8cd560552>
`LocalUploadSource` has the size determined automatically in this case. This is more efficient than :meth:`b2sdk.v2.Bucket.concatenate`, as it can use the overlapping ranges when a remote part is smaller than :term:`absoluteMinimumPartSize` to prevent downloading a range.

Expand Down Expand Up @@ -236,7 +236,7 @@ Scenarios such as below are then possible:
...
>>> file_info = {'how': 'good-file'}
>>> bucket.create_file(generate_input(), remote_name, file_info)
<b2sdk.file_version.FileVersion at 0x7fc8cd560552>
<b2sdk._internal.file_version.FileVersion at 0x7fc8cd560552>
In such case, if the sizes allow for it (there would be no parts smaller than :term:`absoluteMinimumPartSize`), the only uploaded part will be `C-D`. Otherwise, more data will be uploaded, but the data transfer will be reduced in most cases. :meth:`b2sdk.v2.Bucket.create_file` does not guarantee that outbound transfer usage would be optimal, it uses a simple greedy algorithm with as small look-aheads as possible.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/api.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
B2 Api client
===============================================
=============

.. autoclass:: b2sdk.v2.B2Api()
:inherited-members:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/bucket.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
B2 Bucket
===============================================
=========

.. autoclass:: b2sdk.v2.Bucket()
:inherited-members:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/cache.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Cache
===============================================
=====

**b2sdk** caches the mapping between bucket name and bucket
id, so that the user of the library does not need to maintain
Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/data_classes.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Data classes
===============================================
============

.. autoclass:: b2sdk.v2.FileVersion
:inherited-members:
Expand Down
1 change: 0 additions & 1 deletion doc/source/api/downloaded_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ Downloaded File
.. autoclass:: b2sdk.v2.DownloadedFile

.. autoclass:: b2sdk.v2.MtimeUpdatedFile

2 changes: 1 addition & 1 deletion doc/source/api/encryption/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
Encryption Types
================

.. automodule:: b2sdk.encryption.types
.. automodule:: b2sdk._internal.encryption.types
3 changes: 1 addition & 2 deletions doc/source/api/enums.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Enums
===============================================
=====

.. autoclass:: b2sdk.v2.MetadataDirectiveMode
:inherited-members:
Expand All @@ -12,4 +12,3 @@ Enums

.. autoclass:: b2sdk.v2.KeepOrDeleteMode
:inherited-members:

2 changes: 1 addition & 1 deletion doc/source/api/exception.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Exceptions
====================================
==========

.. todo::
improve documentation of exceptions, automodule -> autoclass?
Expand Down
1 change: 0 additions & 1 deletion doc/source/api/file_lock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ File locks
.. autoclass:: b2sdk.v2.NO_RETENTION_FILE_SETTING()

.. autoclass:: b2sdk.v2.UNKNOWN_FILE_RETENTION_SETTING()

6 changes: 3 additions & 3 deletions doc/source/api/internal/b2http.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:mod:`b2sdk.b2http` -- thin http client wrapper
===============================================
:mod:`b2sdk._internal.b2http` -- thin http client wrapper
=========================================================

.. automodule:: b2sdk.b2http
.. automodule:: b2sdk._internal.b2http
6 changes: 3 additions & 3 deletions doc/source/api/internal/cache.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.cache`
===========================
:mod:`b2sdk._internal.cache`
============================

.. automodule:: b2sdk.cache
.. automodule:: b2sdk._internal.cache
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/raw_api.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.raw_api` -- B2 raw api wrapper
=============================================
:mod:`b2sdk._internal.raw_api` -- B2 raw api wrapper
====================================================

.. automodule:: b2sdk.raw_api
.. automodule:: b2sdk._internal.raw_api
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/raw_simulator.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.raw_simulator` -- B2 raw api simulator
==================================================
:mod:`b2sdk._internal.raw_simulator` -- B2 raw api simulator
============================================================

.. automodule:: b2sdk.raw_simulator
.. automodule:: b2sdk._internal.raw_simulator
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/requests.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:mod:`b2sdk.requests` -- modified requests.models.Response class
================================================================
:mod:`b2sdk._internal.requests` -- modified requests.models.Response class
==========================================================================

.. automodule:: b2sdk.requests
.. automodule:: b2sdk._internal.requests
4 changes: 2 additions & 2 deletions doc/source/api/internal/scan/folder.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.scan.folder`
:mod:`b2sdk._internal.scan.folder`
==================================

.. automodule:: b2sdk.scan.folder
.. automodule:: b2sdk._internal.scan.folder
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/scan/folder_parser.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.scan.folder_parser`
================================================
:mod:`b2sdk._internal.scan.folder_parser`
=========================================

.. automodule:: b2sdk.scan.folder_parser
.. automodule:: b2sdk._internal.scan.folder_parser
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/scan/path.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.scan.path`
==============================
:mod:`b2sdk._internal.scan.path`
================================

.. automodule:: b2sdk.scan.path
.. automodule:: b2sdk._internal.scan.path
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/scan/policies.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.scan.policies`
================================================
:mod:`b2sdk._internal.scan.policies`
====================================

.. automodule:: b2sdk.scan.policies
.. automodule:: b2sdk._internal.scan.policies
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/scan/scan.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.scan.scan`
================================================
:mod:`b2sdk._internal.scan.scan`
================================

.. automodule:: b2sdk.scan.scan
.. automodule:: b2sdk._internal.scan.scan
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/session.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.session` -- B2 Session
=============================================
:mod:`b2sdk._internal.session` -- B2 Session
============================================

.. automodule:: b2sdk.session
.. automodule:: b2sdk._internal.session
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/stream/chained.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.stream.chained` ChainedStream
============================================
:mod:`b2sdk._internal.stream.chained` ChainedStream
===================================================

.. automodule:: b2sdk.stream.chained
.. automodule:: b2sdk._internal.stream.chained
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/stream/hashing.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.stream.hashing` StreamWithHash
============================================
:mod:`b2sdk._internal.stream.hashing` StreamWithHash
====================================================

.. automodule:: b2sdk.stream.hashing
.. automodule:: b2sdk._internal.stream.hashing
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/stream/progress.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.stream.progress` Streams with progress reporting
============================================================
:mod:`b2sdk._internal.stream.progress` Streams with progress reporting
======================================================================

.. automodule:: b2sdk.stream.progress
.. automodule:: b2sdk._internal.stream.progress
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/stream/range.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.stream.range` RangeOfInputStream
=============================================
:mod:`b2sdk._internal.stream.range` RangeOfInputStream
======================================================

.. automodule:: b2sdk.stream.range
.. automodule:: b2sdk._internal.stream.range
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/stream/wrapper.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.stream.wrapper` StreamWrapper
=========================================
:mod:`b2sdk._internal.stream.wrapper` StreamWrapper
===================================================

.. automodule:: b2sdk.stream.wrapper
.. automodule:: b2sdk._internal.stream.wrapper
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/sync/action.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.sync.action`
=======================================
:mod:`b2sdk._internal.sync.action`
==================================

.. automodule:: b2sdk.sync.action
.. automodule:: b2sdk._internal.sync.action
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/sync/exception.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.sync.exception`
==============================================
:mod:`b2sdk._internal.sync.exception`
=====================================

.. automodule:: b2sdk.sync.exception
.. automodule:: b2sdk._internal.sync.exception
:members:
:undoc-members:
:show-inheritance:
Expand Down
4 changes: 2 additions & 2 deletions doc/source/api/internal/sync/policy.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.sync.policy`
:mod:`b2sdk._internal.sync.policy`
==================================

.. automodule:: b2sdk.sync.policy
.. automodule:: b2sdk._internal.sync.policy
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/sync/policy_manager.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.sync.policy_manager`
==================================================
:mod:`b2sdk._internal.sync.policy_manager`
==========================================

.. automodule:: b2sdk.sync.policy_manager
.. automodule:: b2sdk._internal.sync.policy_manager
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/sync/sync.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.sync.sync`
==============================
:mod:`b2sdk._internal.sync.sync`
================================

.. automodule:: b2sdk.sync.sync
.. automodule:: b2sdk._internal.sync.sync
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/transfer/inbound/download_manager.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.transfer.inbound.download_manager` -- Manager of downloaders
========================================================================
:mod:`b2sdk._internal.transfer.inbound.download_manager` -- Manager of downloaders
==================================================================================

.. automodule:: b2sdk.transfer.inbound.download_manager
.. automodule:: b2sdk._internal.transfer.inbound.download_manager
:members:
:undoc-members:
:show-inheritance:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.transfer.inbound.downloader.abstract` -- Downloader base class
==========================================================================
:mod:`b2sdk._internal.transfer.inbound.downloader.abstract` -- Downloader base class
====================================================================================

.. automodule:: b2sdk.transfer.inbound.downloader.abstract
.. automodule:: b2sdk._internal.transfer.inbound.downloader.abstract
:members:
:undoc-members:
:show-inheritance:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.transfer.inbound.downloader.parallel` -- ParallelTransferer
=======================================================================
:mod:`b2sdk._internal.transfer.inbound.downloader.parallel` -- ParallelTransferer
=================================================================================

.. automodule:: b2sdk.transfer.inbound.downloader.parallel
.. automodule:: b2sdk._internal.transfer.inbound.downloader.parallel
:members:
:undoc-members:
:show-inheritance:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.transfer.inbound.downloader.simple` -- SimpleDownloader
===================================================================
:mod:`b2sdk._internal.transfer.inbound.downloader.simple` -- SimpleDownloader
=============================================================================

.. automodule:: b2sdk.transfer.inbound.downloader.simple
.. automodule:: b2sdk._internal.transfer.inbound.downloader.simple
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/api/internal/transfer/outbound/upload_source.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:mod:`b2sdk.transfer.outbound.upload_source`
============================================
:mod:`b2sdk._internal.transfer.outbound.upload_source`
======================================================

.. automodule:: b2sdk.transfer.outbound.upload_source
.. automodule:: b2sdk._internal.transfer.outbound.upload_source
:members:
:undoc-members:
:show-inheritance:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/internal/utils.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:mod:`b2sdk._internal.utils`
========================================
============================

.. automodule:: b2sdk._internal.utils
:members:
Expand Down
Loading

0 comments on commit 7929fe5

Please sign in to comment.