# Omnicloud.Airport
Omnicloud.Airport is a Python package for handling data transfer to and from cloud storage providers. It provides a set of classes that implement a common interface for working with cloud storage, making it easy to switch between providers and abstract classes for extending self.
<br/>
## Conception
### Terminal
It is an object that provides cloud related features to existing objects. For example:
- omnicloud.airport.terminals.Dict contains methods for processing dictionary;
- omnicloud.airport.terminals.Pickle - for handling a pickle object.
Every terminal is inherited fom his based object: Dict from dict, Pickle from pickle, so
you can use it in your code directly.
Each terminals contains one or more Gates.
### Gate
Gate is a object that interacts with single cloud.
- omnicloud.airport.terminals.Dict.GStorageJSON - with JSON files at the Google Cloud
Storage bucket;
- omnicloud.airport.terminals.Dict.LocalJSON - with local file.
### Addons
The omnicloud.airport is a platform additional terminals or gates can be installed
into that.
For more information please read [the developer docs](https://docs.omnicloud.world/projects/py-airport/development).
> ## Filling with objects
>
> The base package omnicloud.airport contains terminals for object from a pretty python only and gates for local files to theme.
>
> If you need more please install additional packages. For example omnicloud-airport-dict-gcs
> to get a gate to Google Cloud Storage for dictionary or omnicloud-airport-pydantic to get a
> terminal for pydantic.
## Installation & usage
```bash linenums="1"
pip3 install --upgrade omnicloud-airport
```
```py linenum=1
from omnicloud.airport.terminals import Dict
test_dict = {}
Dict(test_dict).departure('LocalJSON::/tmp::ensure_ascii=False', 'file_name.json')
```
The first argument of the method departure is a "waybill". The second is a filename.
The waybill is a specification for processing data in string format that contains three elements
separated by "::":
1) name of class that represented needs gate;
2) the place for saving to;
3) additional options in format "key=value||key=value||key=b64:..."; it is optional argument.
As a waybill well as filename can contains a part of path:
```py
Dict(test_dict).departure('LocalJSON::/tmp/a::ensure_ascii=False', 'file.json')
Dict(test_dict).departure('LocalJSON::/tmp::ensure_ascii=False', 'a/file.json')
```
Both command in the tutorial above save a data to file "/tmp/a/file.json"
For interaction with different storage (cloud provider) you have to change waybill in your config
or environment variable:
```bash
pip3 install omnicloud-airport-gcp
```
then
```py
Dict(test_dict).departure('GStorageJSON::gs://bucket::ensure_ascii=False||key_file=...', 'a/file.json')
```
Raw data
{
"_id": null,
"home_page": "https://omnicloud.world/airport",
"name": "omnicloud-airport",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "omnicloud,supercloud,multicloud,cloud computing,migration",
"author": "Iurii Tarasenko",
"author_email": "iurii@omnicloud.world",
"download_url": "https://files.pythonhosted.org/packages/56/52/244ef0156de1e080edcd8b94556113c8d00e00a0e9ef0d398819d3cc9a0a/omnicloud_airport-0.0.2.tar.gz",
"platform": null,
"description": "\n# Omnicloud.Airport\n\n\nOmnicloud.Airport is a Python package for handling data transfer to and from cloud storage providers. It provides a set of classes that implement a common interface for working with cloud storage, making it easy to switch between providers and abstract classes for extending self.\n\n<br/>\n\n\n## Conception\n\n### Terminal\n\nIt is an object that provides cloud related features to existing objects. For example:\n\n- omnicloud.airport.terminals.Dict contains methods for processing dictionary;\n- omnicloud.airport.terminals.Pickle - for handling a pickle object.\n\nEvery terminal is inherited fom his based object: Dict from dict, Pickle from pickle, so\nyou can use it in your code directly.\n\nEach terminals contains one or more Gates.\n\n\n### Gate\n\nGate is a object that interacts with single cloud.\n\n- omnicloud.airport.terminals.Dict.GStorageJSON - with JSON files at the Google Cloud\nStorage bucket;\n- omnicloud.airport.terminals.Dict.LocalJSON - with local file.\n\n\n### Addons\n\nThe omnicloud.airport is a platform additional terminals or gates can be installed\ninto that.\n\nFor more information please read [the developer docs](https://docs.omnicloud.world/projects/py-airport/development).\n\n\n> ## Filling with objects\n>\n> The base package omnicloud.airport contains terminals for object from a pretty python only and gates for local files to theme.\n>\n> If you need more please install additional packages. For example omnicloud-airport-dict-gcs\n> to get a gate to Google Cloud Storage for dictionary or omnicloud-airport-pydantic to get a\n> terminal for pydantic.\n\n\n## Installation & usage\n\n```bash linenums=\"1\"\npip3 install --upgrade omnicloud-airport\n```\n\n```py linenum=1\nfrom omnicloud.airport.terminals import Dict\n\ntest_dict = {}\nDict(test_dict).departure('LocalJSON::/tmp::ensure_ascii=False', 'file_name.json')\n```\n\nThe first argument of the method departure is a \"waybill\". The second is a filename.\n\nThe waybill is a specification for processing data in string format that contains three elements\nseparated by \"::\":\n\n1) name of class that represented needs gate;\n\n2) the place for saving to;\n\n3) additional options in format \"key=value||key=value||key=b64:...\"; it is optional argument.\n\n\nAs a waybill well as filename can contains a part of path:\n\n```py\nDict(test_dict).departure('LocalJSON::/tmp/a::ensure_ascii=False', 'file.json')\nDict(test_dict).departure('LocalJSON::/tmp::ensure_ascii=False', 'a/file.json')\n```\n\nBoth command in the tutorial above save a data to file \"/tmp/a/file.json\"\n\nFor interaction with different storage (cloud provider) you have to change waybill in your config\nor environment variable:\n\n```bash\npip3 install omnicloud-airport-gcp\n```\n\nthen\n\n```py\nDict(test_dict).departure('GStorageJSON::gs://bucket::ensure_ascii=False||key_file=...', 'a/file.json')\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "platform for interacting with omnicloud",
"version": "0.0.2",
"split_keywords": [
"omnicloud",
"supercloud",
"multicloud",
"cloud computing",
"migration"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1feb342c6939c6b3c5520b32903cccc5dc5601be54b5dea4a889daeb059205bc",
"md5": "9afa2c89eda075f5e3da9adb5db8970b",
"sha256": "d8b65ebac594bf5e9166eee4e87682493b1e4bc9daf4129bf63b36d555ce41c3"
},
"downloads": -1,
"filename": "omnicloud_airport-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9afa2c89eda075f5e3da9adb5db8970b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 12350,
"upload_time": "2023-04-21T12:29:38",
"upload_time_iso_8601": "2023-04-21T12:29:38.648011Z",
"url": "https://files.pythonhosted.org/packages/1f/eb/342c6939c6b3c5520b32903cccc5dc5601be54b5dea4a889daeb059205bc/omnicloud_airport-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5652244ef0156de1e080edcd8b94556113c8d00e00a0e9ef0d398819d3cc9a0a",
"md5": "b4f095b70879c1aa7efef1fd22aff755",
"sha256": "9b57c247f50c6d955d6390022a300074c7a8e18b5a0e304c29cbba8583e183ce"
},
"downloads": -1,
"filename": "omnicloud_airport-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "b4f095b70879c1aa7efef1fd22aff755",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 8943,
"upload_time": "2023-04-21T12:29:40",
"upload_time_iso_8601": "2023-04-21T12:29:40.546377Z",
"url": "https://files.pythonhosted.org/packages/56/52/244ef0156de1e080edcd8b94556113c8d00e00a0e9ef0d398819d3cc9a0a/omnicloud_airport-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-21 12:29:40",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "omnicloud-airport"
}