FileSystems#
FileSystemAwsS3
#
Manage files on aws s3.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_bucket |
str
|
Name of bucket that contains the original files. |
required |
target_bucket |
str
|
Name of bucket that should contain the new files. If bucket does not already exist an error will be raised, it will not be created automatically. Defaults to be the same as source_bucket. |
None
|
source_dir |
str
|
Directory path from where to start looking for files. If not provided defaults to source_bucket root. |
None
|
target_dir |
str
|
Directory path to where should the new files be written. If not provided defaults to target_bucket root. |
None
|
recursive |
bool
|
Decides whether to look for files recursively. Defaults to True. |
False
|
aws_access_key_id |
str
|
The access key to use when creating the s3 resource. If not provided, the credentials configured for the session will be used. |
None
|
aws_secret_access_key |
str
|
The secret key to use when creating the s3 resource. Same semantics as aws_access_key_id above. |
None
|
region_name |
str
|
The name of the region associated with the resource. If not provided, it will be obtained from the default boto3 session. |
None
|
Source code in renameit/file_systems/aws.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
FileSystemAzureDatalakeStorage
#
Manage files on azure datalake storage gen2.
Supports multiple authentication methods
- Storage account name and access keys
- Storage account connection strings
- Service principal with RBAC assignments
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_container |
str
|
Name of storage account container with the original files. |
required |
target_container |
str
|
Name of storage account container that should contain new files. Defaults to be the same as source_container and it will be created automatically if it doesn't exist. |
None
|
source_dir |
str
|
Directory path from where to start looking for files. If not provided defaults to source_container root. |
None
|
target_dir |
str
|
Directory path to where should the new files be written. If not provided defaults to target_container root. |
None
|
secure_transfer |
bool
|
Whether to use https or not. Uses https by default. |
True
|
recursive |
bool
|
Whether Decides whether to look for files recursively. Defaults to True. |
True
|
connection_string |
str
|
The storage account connection string. |
None
|
storage_account_name |
str
|
Storage account name. |
None
|
storage_account_key |
str
|
Storage account access key. |
None
|
tenant_id |
str
|
Directory (tenant) ID of the service principal (app). |
None
|
client_id |
str
|
Application (client) ID of the service principal (app). |
None
|
client_secret |
str
|
The app password that it uses to authenticate itself. |
None
|
account_url |
str
|
Provided if the storage account was behind a custom
domain name. Defaults to |
None
|
Source code in renameit/file_systems/azure.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
FileSystemGoogleCloudStorage
#
Manage files on google cloud storage.
Authenticating to google cloud storage uses service account credentials and looks for them in the following ordered places:
- Checks
service_account_jsonargument - Checks
service_account_infoargument - Environment variable called
GOOGLE_APPLICATION_CREDENTIALSthat points to json file that contains the credentials
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_bucket |
str
|
Name of bucket that contains the original files. |
required |
target_bucket |
str
|
Name of bucket that should contain the new files. If bucket does not already exist an error will be raised, it will not be created automatically. Defaults to be the same as source_bucket. |
required |
source_dir |
str
|
Directory path from where to start looking for files. If not provided defaults to source_bucket root. |
None
|
target_dir |
str
|
Directory path to where should the new files be written. If not provided defaults to target_bucket root. |
None
|
recursive |
bool
|
Decides whether to look for files recursively. Defaults to True. |
False
|
service_account_json |
str
|
File path to json file that contains service account credentials. |
None
|
service_account_info |
Union[Dict[str, str], str]
|
Service account credentials as dict or a string representing a json object. |
None
|
Source code in renameit/file_systems/google.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
FileSystemLocal
#
Manage files on the local operating system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_dir |
str
|
Source directory to iterate files from. |
required |
target_dir |
str
|
Target directory to copy/rename files to. |
required |
recursive |
bool
|
Decides if listing source_dir should be recursive or not. |
False
|
Source code in renameit/file_systems/local.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |