Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Release v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hyugogirubato committed Jun 11, 2023
1 parent aad76a0 commit 3a67974
Show file tree
Hide file tree
Showing 7 changed files with 243 additions and 171 deletions.
26 changes: 24 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,27 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2023-06-11

### Added

- Detection of the domain available according to the operator.
- Added `test.py` for usage example.
- New icon.

### Fixed

- File code analysis.

### Changed

- Renamed functions.
- Updated `README`.
- Variables now public.
- Header simplification.

## [1.0.4] - 2023-05-22

Expand Down Expand Up @@ -48,8 +67,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [1.0.0] - 2023-04-02

### Added

Initial Release.

[1.1.0]: https://github.com/hyugogirubato/pyuptobox/releases/tag/v1.1.0
[1.0.4]: https://github.com/hyugogirubato/pyuptobox/releases/tag/v1.0.4
[1.0.3]: https://github.com/hyugogirubato/pyuptobox/releases/tag/v1.0.3
[1.0.2]: https://github.com/hyugogirubato/pyuptobox/releases/tag/v1.0.2
Expand Down
129 changes: 53 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,98 +1,75 @@
<p align="center">
<img src="docs/images/uptobox_icon_24.png"> <a href="https://github.com/hyugogirubato/pyuptobox">pyuptobox</a>
<br/>
<sup><em>Python SDK to interact with Uptobox API.</em></sup>
</p>

<p align="center">
<a href="https://pypi.org/project/pyuptobox">
<img src="https://img.shields.io/badge/python-3.7%2B-informational" alt="Python version">
</a>
<a href="https://deepsource.io/gh/hyugogirubato/pyuptobox">
<img src="https://deepsource.io/gh/hyugogirubato/pyuptobox.svg/?label=active+issues" alt="DeepSource">
</a>
</p>
<div align="center">

## Features
<img src="https://github.com/hyugogirubato/pyuptobox/blob/main/docs/images/icon.png" width="10%">

- 🛡️ Methode de connexion multiple
- 📦 Direct use of the service, without restrictions
- 🛠️ Easy implementation in other programs
- 🧩 Plug-and-play installation via setup.py
- ❤️ Forever FOSS!
# PyUptobox

## Installation
[![License](https://img.shields.io/github/license/hyugogirubato/pyuptobox)](https://github.com/hyugogirubato/pyuptobox/blob/main/LICENSE)
[![Release](https://img.shields.io/github/release-date/hyugogirubato/pyuptobox)](https://github.com/hyugogirubato/pyuptobox/releases)
[![Latest Version](https://img.shields.io/pypi/v/pyuptobox)](https://pypi.org/project/pyuptobox/)

*Note: Requires [Python] 3.7.0 or newer with PIP installed.*
</div>

```shell
$ python setup.py install
```
PyUptobox is a Python client for the Uptobox API. It provides convenient methods for authentication, file management,
and file download/upload operations with Uptobox, a popular file hosting service.

You now have the `pyuptobox` package installed and a `pyuptobox` executable is now available.
## Features

- Authenticate with Uptobox using login credentials or token
- Get user account information
- Set various user settings (SSL download, direct download, etc.)
- Manage files and folders (create, delete, move, rename)
- Retrieve file information and download links
- Upload files to Uptobox
- Get streaming links and transcode files
- and more...

### From Source Code
## Installation

The following steps are instructions on download, preparing, and running the code under a Venv environment.
You can skip steps 3-5 with a simple `pip install .` call instead, but you miss out on a wide array of benefits.
You can install PyUptobox using pip:

1. `git clone https://github.com/hyugogirubato/pyuptobox`
2. `cd pyuptobox`
3. `python -m venv env`
4. `source env/bin/activate`
5. `python setup.py install`
````shell
pip install pyuptobox
````

As seen in Step 5, running the `pyuptobox` executable is somewhat different to a normal PIP installation.
See [Venv's Docs] on various ways of making calls under the virtual-environment.
## Usage

[Python]: <https://python.org>
[Venv's]: <https://docs.python.org/3/tutorial/venv.html>
[Venv's Docs]: <https://docs.python.org/3/library/venv.html>
Here's an example of how to use the PyUptobox library:

## Usage
```python
from pyuptobox.client import Client
from pyuptobox.utils import get_code, get_size

The following is a minimal example of using pyuptobox in a script. It gets the download link of a
file. There's various stuff not shown in this specific example like:
# Create client
client = Client()

- Searching for a file
- Uploading a file
- User information
- and much more!
# Login
client.login(token="YOUR_USER_TOKEN")

Just take a look around the Client code to see what stuff does. Everything is documented quite well.
There's also various functions in `utils.py` that showcases a lot of features.
# Get file code
file_code = get_code(value="https://uptobox.com/your-file-url")

# Get file info
info = client.get_files_info(file_codes=[file_code])[0]
file_size = get_size(info["file_size"])

# Get file download link
link = client.get_file_link(file_code=file_code)["dlLink"]

print("File Name: {}".format(info["file_name"]))
print("File Size: {}".format(file_size))
print("Download Link: {}".format(link))

```py
from pyuptobox.client import Client
from pyuptobox import utils

# Demo: https://uptobox.eu/5w4rff6r17oz
if __name__ == "__main__":
# create client
client = Client()
file_code = utils.get_code(value="https://uptobox.eu/5w4rff6r17oz")

# login
data = client.login(token="USER_TOKEN")

# get file info
info = client.get_file_info(file_codes=[file_code])

# get file download link
link = client.get_file_link(file_code=file_code)

print("I: Subscription: {}".format("PREMIUM" if data["premium"] == 1 else "FREE"))
print("I: Name: {}".format(info["file_name"]))
print("I: Size: {}".format(info["file_size"]))
print("I: Link: {}".format(link))
```

## Credit
For more information on how to use PyUptobox, please refer to the [documentation](https://docs.uptobox.com).

## Disclaimer

- Uptobox Icon &copy; Uptobox.
- The great community for their shared research and knowledge about Uptobox and its API.
PyUptobox is an unofficial library and is not affiliated with or endorsed by Uptobox or Uptostream. The library is
provided "as is" without any warranty, and the usage of this library is at your own risk. Make sure to comply with the
terms and conditions of the Uptobox service while using this library.

## License
### License

[GNU General Public License, Version 3.0](LICENSE)
This project is licensed under the [GPL v3 License](https://github.com/hyugogirubato/pyuptobox/blob/main/LICENSE).
4 changes: 2 additions & 2 deletions pyuptobox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .client import Client
from .client import Client, Direction, Order
from .utils import *

__version__ = "1.0.4"
__version__ = "1.1.0"
Loading

0 comments on commit 3a67974

Please sign in to comment.