pykrakenfiles


Namepykrakenfiles JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/bontoutou00/pykrakenfiles
SummaryKrakenfiles upload API wrapper
upload_time2023-04-20 13:42:50
maintainer
docs_urlNone
authorbontoutou
requires_python>=3.7
license
keywords krakenfiles upload
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pykrakenfiles
Package to upload file(s) with KrakenFiles public API

## Installation

Windows:

```
pip install pykrakenfiles
```

Linux/Mac OS:

```
pip3 install pykrakenfiles
```
# Documentation module

[KrakenFiles API](https://krakenfiles.com/developers/api/upload)

`kraken = Krakenfiles(api_key=None|API_KEY)` | Create instance of Krakenfiles, the api_key is not required.

When creating an instance of `Krakenfiles()` with an API_KEY it also populate `kraken.files` with a list of the files from the account.

`kraken.upload('image.png')` | Upload a file or list of files to Krakenfiles. Take file path as parameter.
File path can be a string or a list of file paths

You can configure `progress_bar=True|False` and `show_filename=True|False` when uploading

It return a list of uploads `kraken.uploads`

### Example

```python
from pykrakenfiles import Krakenfiles

kraken = Krakenfiles(api_key='API_KEY')
file_path = 'path/image.png'
kraken.upload(file_path)
print(kraken.uploads)
```
```
Uploaded: image.png
Link: https://krakenfiles.com/view/iwfiifwi/file.html
[{'url': 'https://krakenfiles.com/view/iwfiifwi/file.html', 'hash': '0oxD8LP7LQ', 'title': 'image.png', 'size': '5.48 MB', 'folderId': None}]
```

# Documentation CLI
## pykrakenfiles
```console
usage: pykrakenfiles [-h] [-a API_KEY] -p PATHS [PATHS ...] [--output_filetype {yaml,txt}] [-o OUTPUT_DEST] [-r {0,1,2,3,4,5}] [--show_progress_bar] [--hide_progress_bar] [--show_filename] [--hide_filename]

Upload files to KrakenFiles.

options:
  -h, --help            show this help message and exit
  -a API_KEY, --api_key API_KEY
                        API Key from KrakenFiles account. File limit is 2GB instead of 1GB when using an account. Default = None
  -p PATHS [PATHS ...], --paths PATHS [PATHS ...]
                        Paths to look in for files to upload. Can be multiple paths
  --output_filetype {yaml,txt}
                        Output file type. Default = yaml
  -o OUTPUT_DEST, --output_dest OUTPUT_DEST
                        Output path destination. Default = Current working directory
  -r {0,1,2,3,4,5}, --retries {0,1,2,3,4,5}
                        How many times to re-attempt failed uploads. Default = 0.
  --show_progress_bar   Show the progress bar. (Default)
  --hide_progress_bar   Hide the progress bar.
  --show_filename       Show the filename. (Default)
  --hide_filename       Hide the filename.

```
### Example 
Upload `test.txt` with `API_KEY` and output the link to a yaml file in `C:\Users\Downloads`, retry `3` times if the upload fail.
```console
pykrakenfiles -a <API_KEY> -p c:\Users\test.txt -r 3 --hide_filename -o C:\Users\Downloads
```
## pykrakenfiles-list
```console
usage: pykrakenfiles-list [-h] -a API_KEY [--files] [--folders] [-o OUTPUT]

List files/folders from a KrakenFiles account.

options:
  -h, --help            show this help message and exit
  -a API_KEY, --api_key API_KEY
                        API Key from KrakenFiles account.
  --files               List files from KrakenFiles account.
  --folders             List folders from KrakenFiles account.
  -o OUTPUT, --output OUTPUT
                        Output path destination. Default = Current working directory
```
Will return a list of files/folders from the account specified and export them to a yaml file.
### Example 
List all the `files` from `API_KEY` and output them to a yaml file in `C:\Users\Downloads`.
```console
pykrakenfiles-list -a <API_KEY> --files -o C:\Users\Downloads
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bontoutou00/pykrakenfiles",
    "name": "pykrakenfiles",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "krakenfiles,upload",
    "author": "bontoutou",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/a0/ab/ecc7b13e55d3931061c650be413acb511c542215190dd4505f597a175d31/pykrakenfiles-0.0.2.tar.gz",
    "platform": null,
    "description": "# pykrakenfiles\nPackage to upload file(s) with KrakenFiles public API\n\n## Installation\n\nWindows:\n\n```\npip install pykrakenfiles\n```\n\nLinux/Mac OS:\n\n```\npip3 install pykrakenfiles\n```\n# Documentation module\n\n[KrakenFiles API](https://krakenfiles.com/developers/api/upload)\n\n`kraken = Krakenfiles(api_key=None|API_KEY)` | Create instance of Krakenfiles, the api_key is not required.\n\nWhen creating an instance of `Krakenfiles()` with an API_KEY it also populate `kraken.files` with a list of the files from the account.\n\n`kraken.upload('image.png')` | Upload a file or list of files to Krakenfiles. Take file path as parameter.\nFile path can be a string or a list of file paths\n\nYou can configure `progress_bar=True|False` and `show_filename=True|False` when uploading\n\nIt return a list of uploads `kraken.uploads`\n\n### Example\n\n```python\nfrom pykrakenfiles import Krakenfiles\n\nkraken = Krakenfiles(api_key='API_KEY')\nfile_path = 'path/image.png'\nkraken.upload(file_path)\nprint(kraken.uploads)\n```\n```\nUploaded: image.png\nLink: https://krakenfiles.com/view/iwfiifwi/file.html\n[{'url': 'https://krakenfiles.com/view/iwfiifwi/file.html', 'hash': '0oxD8LP7LQ', 'title': 'image.png', 'size': '5.48 MB', 'folderId': None}]\n```\n\n# Documentation CLI\n## pykrakenfiles\n```console\nusage: pykrakenfiles [-h] [-a API_KEY] -p PATHS [PATHS ...] [--output_filetype {yaml,txt}] [-o OUTPUT_DEST] [-r {0,1,2,3,4,5}] [--show_progress_bar] [--hide_progress_bar] [--show_filename] [--hide_filename]\n\nUpload files to KrakenFiles.\n\noptions:\n  -h, --help            show this help message and exit\n  -a API_KEY, --api_key API_KEY\n                        API Key from KrakenFiles account. File limit is 2GB instead of 1GB when using an account. Default = None\n  -p PATHS [PATHS ...], --paths PATHS [PATHS ...]\n                        Paths to look in for files to upload. Can be multiple paths\n  --output_filetype {yaml,txt}\n                        Output file type. Default = yaml\n  -o OUTPUT_DEST, --output_dest OUTPUT_DEST\n                        Output path destination. Default = Current working directory\n  -r {0,1,2,3,4,5}, --retries {0,1,2,3,4,5}\n                        How many times to re-attempt failed uploads. Default = 0.\n  --show_progress_bar   Show the progress bar. (Default)\n  --hide_progress_bar   Hide the progress bar.\n  --show_filename       Show the filename. (Default)\n  --hide_filename       Hide the filename.\n\n```\n### Example \nUpload `test.txt` with `API_KEY` and output the link to a yaml file in `C:\\Users\\Downloads`, retry `3` times if the upload fail.\n```console\npykrakenfiles -a <API_KEY> -p c:\\Users\\test.txt -r 3 --hide_filename -o C:\\Users\\Downloads\n```\n## pykrakenfiles-list\n```console\nusage: pykrakenfiles-list [-h] -a API_KEY [--files] [--folders] [-o OUTPUT]\n\nList files/folders from a KrakenFiles account.\n\noptions:\n  -h, --help            show this help message and exit\n  -a API_KEY, --api_key API_KEY\n                        API Key from KrakenFiles account.\n  --files               List files from KrakenFiles account.\n  --folders             List folders from KrakenFiles account.\n  -o OUTPUT, --output OUTPUT\n                        Output path destination. Default = Current working directory\n```\nWill return a list of files/folders from the account specified and export them to a yaml file.\n### Example \nList all the `files` from `API_KEY` and output them to a yaml file in `C:\\Users\\Downloads`.\n```console\npykrakenfiles-list -a <API_KEY> --files -o C:\\Users\\Downloads\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Krakenfiles upload API wrapper",
    "version": "0.0.2",
    "split_keywords": [
        "krakenfiles",
        "upload"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "708628598dca3ea67115b050bf8234cb7746c513ee881acfe9d1571aeffc8210",
                "md5": "6f3983bca8d9499681921ad9ade9611f",
                "sha256": "4e8c2a7421c053178ae8c7dc53c850522d0fa434ad641726b6044a78981b9ffd"
            },
            "downloads": -1,
            "filename": "pykrakenfiles-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f3983bca8d9499681921ad9ade9611f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7139,
            "upload_time": "2023-04-20T13:42:48",
            "upload_time_iso_8601": "2023-04-20T13:42:48.674706Z",
            "url": "https://files.pythonhosted.org/packages/70/86/28598dca3ea67115b050bf8234cb7746c513ee881acfe9d1571aeffc8210/pykrakenfiles-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a0abecc7b13e55d3931061c650be413acb511c542215190dd4505f597a175d31",
                "md5": "61e8be100e8bf5a094e0153cfc063e91",
                "sha256": "726ba64ca69c5c30fb04185d1bab1e08de9de5d6b3a7c3552a779b13a7cef0e9"
            },
            "downloads": -1,
            "filename": "pykrakenfiles-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "61e8be100e8bf5a094e0153cfc063e91",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 7111,
            "upload_time": "2023-04-20T13:42:50",
            "upload_time_iso_8601": "2023-04-20T13:42:50.750167Z",
            "url": "https://files.pythonhosted.org/packages/a0/ab/ecc7b13e55d3931061c650be413acb511c542215190dd4505f597a175d31/pykrakenfiles-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-20 13:42:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "bontoutou00",
    "github_project": "pykrakenfiles",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pykrakenfiles"
}
        
Elapsed time: 0.06102s