https://github.com/nathaniel-daniel/mega-rs
A Rust API for Mega
https://github.com/nathaniel-daniel/mega-rs
mega python rust
Last synced: 3 months ago
JSON representation
A Rust API for Mega
- Host: GitHub
- URL: https://github.com/nathaniel-daniel/mega-rs
- Owner: nathaniel-daniel
- License: apache-2.0
- Created: 2022-11-26T08:11:19.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2026-01-13T03:20:21.000Z (3 months ago)
- Last Synced: 2026-01-13T06:45:40.180Z (3 months ago)
- Topics: mega, python, rust
- Language: Rust
- Homepage: https://nathaniel-daniel.github.io/mega-rs/mega/
- Size: 2.82 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# mega-rs
A Rust API for mega.
## Features
`easy`: Enable the easy interface, which exposes an easier to use, higher level api client
## CLI
This library contains a simple CLI.
### Download a File
```bash
mega-cli get ""
```
### List a Folder
```bash
mega-cli ls ""
```
## Python Binding
This repository also contains a small Python binding.
Here's an example of how it may be used to download a file:
```python
import mega_py
import shutil
client = mega_py.Client()
file = client.get_file('https://mega.nz/file/7glwEQBT#Fy9cwPpCmuaVdEkW19qwBLaiMeyufB1kseqisOAxfi8')
with open(file.name, 'wb') as dest:
shutil.copyfileobj(client.download_file(file), dest)
```
## References
- http://julien-marchand.fr/blog/using-mega-api-with-python-examples/
- https://github.com/meganz/sdk/blob/9a951c9db1734cac3f44603f0491bc9755986aa7/doc/source/internals.rst
- https://mega.io/doc
- https://github.com/meganz/sdk