Skip to content
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
5 changes: 5 additions & 0 deletions doc/sphinx/package_service_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,11 @@
"service_name": "Storage",
"manually_generated": true
},
"azure-storage-file-datalake": {
"category": "Client",
"service_name": "Storage",
"manually_generated": true
},
"azure-storage-queue": {
"category": "Client",
"service_name": "Storage",
Expand Down
1 change: 1 addition & 0 deletions eng/tox/import_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"azure.appconfiguration", # Github issue 7879. revisit and close after azure-core POST b4 is released.
"azure.storage.blob", # Github issue 7879.
"azure.storage.fileshare", # Github issue 7879.
"azure.storage.filedatalake", # Github issue 7879.
"azure.storage.queue", # Github issue 7879.
"azure",
"azure.mgmt",
Expand Down
1 change: 1 addition & 0 deletions packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,4 @@
| [`azure-storage-blob`]( sdk/storage/azure-storage-blob/setup.py )| [Readme](sdk/storage/azure-storage-blob/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-storage-blob ) |
| [`azure-storage-file-share`]( sdk/storage/azure-storage-file-share/setup.py )| [Readme](sdk/storage/azure-storage-file-share/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-storage-file-share ) |
| [`azure-storage-queue`]( sdk/storage/azure-storage-queue/setup.py )| [Readme](sdk/storage/azure-storage-queue/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-storage-queue ) |
| [`azure-storage-file-datalake`]( sdk/storage/azure-storage-file-datalake/setup.py )| [Readme](sdk/storage/azure-storage-file-datalake/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-storage-file-datalake ) |
15 changes: 15 additions & 0 deletions sdk/storage/azure-storage-file-datalake/HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Change Log azure-storage-file-datalake

## Version 12.0.0b5 (2019-11-06)
- Initial Release. Please see the README for information on the new design.
- Support for Azure Data Lake Storage REST APIs.
- Support for DataLakeServiceClient: create file system, delete file system, get file systems, and get user delegation key
- Support for DataLakeLeaseClient: acquire, renew, release, change, and break lease
- Support for FileSystemClient: create, delete, get properties, set metadata, get paths, create directory, delete directory, create file, delete file
- Support for DataLakeDirectoryClient: create, delete, rename, get properties, get access control, set metadata, set properties, set access control, create file, delete file, create sub-directory, delete sub-directory
- Support for DataLakeFileClient: create, delete, rename, get properties, get access control, set metadata, set properties, set access control, append, flush, read

This package's
[documentation](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/README.md)
and
[samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/samples)
12 changes: 6 additions & 6 deletions sdk/storage/azure-storage-file-datalake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This preview package for Python includes ADLS Gen2 specific API support made ava
2. Permission related operations (Get/Set ACLs) for hierarchical namespace enabled (HNS) accounts.


[Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake) | [Package (PyPi)](https://pypi.org/project/azure-storage-file-datalake/) | [API reference documentation](https://aka.ms/azsdk-python-storage-file-datalake-ref) | [Product documentation](https://docs.microsoft.com/azure/storage/) | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/samples)
[Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake) | [Package (PyPi)](https://pypi.org/project/azure-storage-file-datalake/) | [API reference documentation](https://aka.ms/azsdk-python-storage-filedatalake-ref) | [Product documentation](https://docs.microsoft.com/azure/storage/) | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/samples)


## Getting started
Expand Down Expand Up @@ -59,7 +59,7 @@ You can omit the credential if your account URL already has a SAS token.
Once you have your account URL and credentials ready, you can create the DataLakeServiceClient:

```python
from azure.storage.file.datalake import DataLakeServiceClient
from azure.storage.filedatalake import DataLakeServiceClient

service = DataLakeServiceClient(account_url="https://<my-storage-account-name>.dfs.core.windows.net/", credential=credential)
```
Expand Down Expand Up @@ -111,7 +111,7 @@ The following sections provide several code snippets covering some of the most c
Create the DataLakeServiceClient using the connection string to your Azure Storage account.

```python
from azure.storage.file.datalake import DataLakeServiceClient
from azure.storage.filedatalake import DataLakeServiceClient

service = DataLakeServiceClient.from_connection_string(conn_str="my_connection_string")
```
Expand All @@ -120,7 +120,7 @@ service = DataLakeServiceClient.from_connection_string(conn_str="my_connection_s
Upload a file to your file system.

```python
from azure.storage.file.datalake import DataLakeFileClient
from azure.storage.filedatalake import DataLakeFileClient

data = b"abc"
file = DataLakeFileClient.from_connection_string("my_connection_string",
Expand All @@ -134,7 +134,7 @@ file.flush_data(len(data))
Download a file from your file system.

```python
from azure.storage.file.datalake import DataLakeFileClient
from azure.storage.filedatalake import DataLakeFileClient

file = DataLakeFileClient.from_connection_string("my_connection_string",
file_system_name="myfilesystem", file_path="myfile")
Expand All @@ -147,7 +147,7 @@ with open("./BlockDestination.txt", "wb") as my_file:
List the paths in your file system.

```python
from azure.storage.file.datalake import FileSystemClient
from azure.storage.filedatalake import FileSystemClient

file_system = FileSystemClient.from_connection_string("my_connection_string", file_system_name="myfilesystem")

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def from_connection_string(
key, or an instance of a TokenCredentials class from azure.identity.
Credentials provided here will take precedence over those in the connection string.
:return a DataLakeDirectoryClient
:rtype ~azure.storage.file.datalake.DataLakeDirectoryClient
:rtype ~azure.storage.filedatalake.DataLakeDirectoryClient
"""
account_url, secondary, credential = parse_connection_str(conn_str, credential, 'dfs')
if 'secondary_hostname' not in kwargs:
Expand All @@ -102,15 +102,15 @@ def create_directory(self, content_settings=None, # type: Optional[ContentSetti
"""
Create a new directory.

:param ~azure.storage.file.datalake.ContentSettings content_settings:
:param ~azure.storage.filedatalake.ContentSettings content_settings:
ContentSettings object used to set path properties.
:param metadata:
Name-value pairs associated with the blob as metadata.
:type metadata: dict(str, str)
:keyword lease:
Required if the blob has an active lease. Value can be a DataLakeLeaseClient object
or the lease ID as a string.
:paramtype lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str
:paramtype lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
:keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account.
When creating a file or directory and the parent folder does not have a default ACL,
the umask restricts the permissions of the file or directory to be created.
Expand Down Expand Up @@ -195,7 +195,7 @@ def get_directory_properties(self, **kwargs):
:keyword lease:
Required if the directory or file has an active lease. Value can be a DataLakeLeaseClient object
or the lease ID as a string.
:type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str
:type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
:keyword ~datetime.datetime if_modified_since:
A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
Expand Down Expand Up @@ -239,13 +239,13 @@ def rename_directory(self, rename_destination, **kwargs):
:keyword source_lease: A lease ID for the source path. If specified,
the source path must have an active lease and the leaase ID must
match.
:keyword source_lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str
:param ~azure.storage.file.datalake.ContentSettings content_settings:
:keyword source_lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
:param ~azure.storage.filedatalake.ContentSettings content_settings:
ContentSettings object used to set path properties.
:keyword lease:
Required if the file/directory has an active lease. Value can be a LeaseClient object
or the lease ID as a string.
:type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str
:type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
:keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account.
When creating a file or directory and the parent folder does not have a default ACL,
the umask restricts the permissions of the file or directory to be created.
Expand Down Expand Up @@ -331,13 +331,13 @@ def create_sub_directory(self, sub_directory, # type: Union[DirectoryProperties
:param sub_directory:
The directory with which to interact. This can either be the name of the directory,
or an instance of DirectoryProperties.
:type sub_directory: str or ~azure.storage.file.datalake.DirectoryProperties
:param ~azure.storage.file.datalake.ContentSettings content_settings:
:type sub_directory: str or ~azure.storage.filedatalake.DirectoryProperties
:param ~azure.storage.filedatalake.ContentSettings content_settings:
ContentSettings object used to set path properties.
:param metadata:
Name-value pairs associated with the blob as metadata.
:type metadata: dict(str, str)
:keyword ~azure.storage.file.datalake.DataLakeLeaseClient or str lease:
:keyword ~azure.storage.filedatalake.DataLakeLeaseClient or str lease:
Required if the blob has an active lease. Value can be a DataLakeLeaseClient object
or the lease ID as a string.
:keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account.
Expand Down Expand Up @@ -391,7 +391,7 @@ def delete_sub_directory(self, sub_directory, # type: Union[DirectoryProperties
:param sub_directory:
The directory with which to interact. This can either be the name of the directory,
or an instance of DirectoryProperties.
:type sub_directory: str or ~azure.storage.file.datalake.DirectoryProperties
:type sub_directory: str or ~azure.storage.filedatalake.DirectoryProperties
:keyword lease:
Required if the blob has an active lease. Value can be a LeaseClient object
or the lease ID as a string.
Expand Down Expand Up @@ -434,13 +434,13 @@ def create_file(self, file, # type: Union[FileProperties, str]
:param file:
The file with which to interact. This can either be the name of the file,
or an instance of FileProperties.
:type file: str or ~azure.storage.file.datalake.FileProperties
:keyword ~azure.storage.file.datalake.ContentSettings content_settings:
:type file: str or ~azure.storage.filedatalake.FileProperties
:keyword ~azure.storage.filedatalake.ContentSettings content_settings:
ContentSettings object used to set path properties.
:keyword metadata:
Name-value pairs associated with the blob as metadata.
:type metadata: dict(str, str)
:keyword ~azure.storage.file.datalake.DataLakeLeaseClient or str lease:
:keyword ~azure.storage.filedatalake.DataLakeLeaseClient or str lease:
Required if the blob has an active lease. Value can be a DataLakeLeaseClient object
or the lease ID as a string.
:keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account.
Expand Down Expand Up @@ -495,9 +495,9 @@ def get_file_client(self, file # type: Union[FileProperties, str]
:param file:
The file with which to interact. This can either be the name of the file,
or an instance of FileProperties. eg. directory/subdirectory/file
:type file: str or ~azure.storage.file.datalake.FileProperties
:type file: str or ~azure.storage.filedatalake.FileProperties
:returns: A DataLakeFileClient.
:rtype: ~azure.storage.file.datalake..DataLakeFileClient
:rtype: ~azure.storage.filedatalake..DataLakeFileClient

.. admonition:: Example:

Expand Down Expand Up @@ -530,9 +530,9 @@ def get_sub_directory_client(self, sub_directory # type: Union[DirectoryPropert
:param sub_directory:
The directory with which to interact. This can either be the name of the directory,
or an instance of DirectoryProperties.
:type sub_directory: str or ~azure.storage.file.datalake.DirectoryProperties
:type sub_directory: str or ~azure.storage.filedatalake.DirectoryProperties
:returns: A DataLakeDirectoryClient.
:rtype: ~azure.storage.file.datalake.DataLakeDirectoryClient
:rtype: ~azure.storage.filedatalake.DataLakeDirectoryClient

.. admonition:: Example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def from_connection_string(
key, or an instance of a TokenCredentials class from azure.identity.
Credentials provided here will take precedence over those in the connection string.
:return a DataLakeFileClient
:rtype ~azure.storage.file.datalake.DataLakeFileClient
:rtype ~azure.storage.filedatalake.DataLakeFileClient
"""
account_url, secondary, credential = parse_connection_str(conn_str, credential, 'dfs')
if 'secondary_hostname' not in kwargs:
Expand All @@ -107,12 +107,12 @@ def create_file(self, content_settings=None, # type: Optional[ContentSettings]
"""
Create a new file.

:param ~azure.storage.file.datalake.ContentSettings content_settings:
:param ~azure.storage.filedatalake.ContentSettings content_settings:
ContentSettings object used to set path properties.
:param metadata:
Name-value pairs associated with the blob as metadata.
:type metadata: dict(str, str)
:keyword ~azure.storage.file.datalake.DataLakeLeaseClient or str lease:
:keyword ~azure.storage.filedatalake.DataLakeLeaseClient or str lease:
Required if the blob has an active lease. Value can be a DataLakeLeaseClient object
or the lease ID as a string.
:keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account.
Expand Down Expand Up @@ -199,7 +199,7 @@ def get_file_properties(self, **kwargs):
:keyword lease:
Required if the directory or file has an active lease. Value can be a DataLakeLeaseClient object
or the lease ID as a string.
:type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str
:type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
:keyword ~datetime.datetime if_modified_since:
A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
Expand Down Expand Up @@ -279,7 +279,7 @@ def append_data(self, data, # type: Union[AnyStr, Iterable[AnyStr], IO[AnyStr]]
:keyword lease:
Required if the blob has an active lease. Value can be a LeaseClient object
or the lease ID as a string.
:type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str
:type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
:return: dict of the response header
"""
options = self._append_data_options(
Expand Down Expand Up @@ -446,13 +446,13 @@ def rename_file(self, rename_destination, **kwargs):
:keyword source_lease: A lease ID for the source path. If specified,
the source path must have an active lease and the leaase ID must
match.
:keyword source_lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str
:param ~azure.storage.file.datalake.ContentSettings content_settings:
:keyword source_lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
:param ~azure.storage.filedatalake.ContentSettings content_settings:
ContentSettings object used to set path properties.
:keyword lease:
Required if the file/directory has an active lease. Value can be a LeaseClient object
or the lease ID as a string.
:type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str
:type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str
:keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account.
When creating a file or directory and the parent folder does not have a default ACL,
the umask restricts the permissions of the file or directory to be created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class DataLakeLeaseClient(object):

:param client:
The client of the file system, directory, or file to lease.
:type client: ~azure.storage.file.datalake.FileSystemClient or
~azure.storage.file.datalake.DataLakeDirectoryClient or ~azure.storage.file.datalake.DataLakeFileClient
:type client: ~azure.storage.filedatalake.FileSystemClient or
~azure.storage.filedatalake.DataLakeDirectoryClient or ~azure.storage.filedatalake.DataLakeFileClient
:param str lease_id:
A string representing the lease ID of an existing lease. This value does not
need to be specified in order to acquire a new lease, or break one.
Expand Down
Loading