tello-renewal


Nametello-renewal JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryTello mobile plan automatic renewal system
upload_time2025-08-22 23:23:38
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords tello mobile renewal automation selenium
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tello-Renewal

[δΈ­ζ–‡η‰ˆ](README_zh.md) | [English Version](README_en.md)

Automatic renewal system for Tello mobile plans using web automation.

## Features

- πŸ”„ Automatic plan renewal using Selenium web automation
- πŸ“§ Email notifications for success/failure
- πŸ§ͺ Dry run mode for testing
- βš™οΈ TOML configuration with validation
- πŸ”’ Secure credential handling
- πŸ“Š Comprehensive logging
- 🐳 Docker support (planned)

## Installation

### From Source

```bash
# Clone the repository
git clone <repository-url>
cd tello-renewal

# Install in development mode
pip install -e .

# Or install from PyPI (when published)
pip install tello-renewal
```

### Requirements

- Python 3.10+
- Firefox, Chrome, or Edge browser
- WebDriver for your chosen browser (geckodriver for Firefox)

## Quick Start

1. **Create configuration file:**

   ```bash
   tello-renewal config-init
   ```

2. **Edit the configuration:**

   ```bash
   # Edit config.toml with your settings
   nano config.toml
   ```

3. **Test your configuration:**

   ```bash
   # Validate configuration
   tello-renewal config-validate

   # Test email notifications
   tello-renewal email-test

   # Check account status
   tello-renewal status
   ```

4. **Run renewal (dry run first):**

   ```bash
   # Test renewal without actually renewing
   tello-renewal renew --dry-run

   # Perform actual renewal
   tello-renewal renew
   ```

## Configuration

The system uses TOML configuration files. Here's a minimal example:

```toml
[tello]
email = "your_email@example.com"
password = "your_password"
card_expiration = "1/25"  # MM/YY format

[smtp]
server = "smtp.gmail.com"
port = 587
username = "your_email@gmail.com"
password = "your_app_password"
from_email = '"Tello Renewal" <your_email@gmail.com>'

[notifications]
email_enabled = true
recipients = ["admin@example.com"]
```

### Configuration Sections

- **`[tello]`** - Tello account credentials and settings
- **`[browser]`** - Browser automation settings
- **`[renewal]`** - Renewal behavior configuration
- **`[smtp]`** - Email server settings
- **`[notifications]`** - Notification preferences
- **`[logging]`** - Logging configuration

## CLI Commands

### Basic Operations

```bash
# Execute renewal
tello-renewal renew [--dry-run]

# Check account status and balance information
tello-renewal status
```

### Configuration Management

```bash
# Create example configuration
tello-renewal config-init [--output config.toml]

# Validate configuration
tello-renewal config-validate
```

### Testing

```bash
# Test email notifications
tello-renewal email-test
```

### Options

- `--config, -c` - Specify configuration file path
- `--verbose, -v` - Enable verbose logging
- `--help` - Show help information

## Exit Codes

| Code | Meaning             |
| ---- | ------------------- |
| 0    | Success             |
| 1    | General error       |
| 2    | Configuration error |
| 5    | Renewal failed      |
| 6    | Not due for renewal |

## Scheduling

### Cron Job

Add to your crontab to run daily:

```bash
# Run daily at 9 AM
0 9 * * * /path/to/venv/bin/tello-renewal renew

# With logging
0 9 * * * /path/to/venv/bin/tello-renewal renew >> /var/log/tello-renewal.log 2>&1
```

### Systemd Service

Create `/etc/systemd/system/tello-renewal.service`:

```ini
[Unit]
Description=Tello Plan Auto Renewal
After=network.target

[Service]
Type=oneshot
User=tello
WorkingDirectory=/opt/tello-renewal
ExecStart=/opt/tello-renewal/venv/bin/tello-renewal renew
```

Create `/etc/systemd/system/tello-renewal.timer`:

```ini
[Unit]
Description=Run Tello renewal daily
Requires=tello-renewal.service

[Timer]
OnCalendar=daily
Persistent=true

[Install]
WantedBy=timers.target
```

Enable and start:

```bash
sudo systemctl enable tello-renewal.timer
sudo systemctl start tello-renewal.timer
```

## Security Considerations

- Store sensitive configuration files with restricted permissions (600)
- Use app passwords for email authentication
- Consider encrypting configuration files containing passwords
- Run with minimal privileges
- Regularly update dependencies

## Troubleshooting

### Common Issues

1. **WebDriver not found:**

   ```bash
   # Install geckodriver for Firefox
   # On Ubuntu/Debian:
   sudo apt install firefox-geckodriver

   # On macOS:
   brew install geckodriver
   ```

2. **Login failures:**

   - Verify credentials in configuration
   - Check if Tello website structure has changed
   - Try running with `--verbose` for detailed logs

3. **Email sending failures:**

   - Verify SMTP settings
   - Use app passwords for Gmail
   - Test with `tello-renewal email-test`

4. **Browser automation issues:**
   - Try different browser types in configuration
   - Disable headless mode for debugging
   - Check browser and WebDriver versions

### Debug Mode

Run with verbose logging to troubleshoot issues:

```bash
tello-renewal --verbose renew --dry-run
```

### Log Files

Check log files for detailed error information:

```bash
tail -f tello_renewal.log
```

## Development

### Setup Development Environment

```bash
# Clone repository
git clone <repository-url>
cd tello-renewal

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode with dev dependencies
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install
```

### Running Tests

```bash
# Run all tests
pytest

# Run with coverage
pytest --cov=tello_renewal

# Run specific test file
pytest tests/test_models.py
```

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests for new functionality
5. Ensure all tests pass
6. Submit a pull request

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Disclaimer

This software is provided as-is for educational and automation purposes. Users are responsible for:

- Ensuring compliance with Tello's terms of service
- Maintaining the security of their credentials
- Monitoring the renewal process
- Having backup payment methods available

The authors are not responsible for any service interruptions, failed renewals, or other issues that may arise from using this software.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tello-renewal",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "tello, mobile, renewal, automation, selenium",
    "author": null,
    "author_email": "Oaklight <oaklight@gmx.com>",
    "download_url": "https://files.pythonhosted.org/packages/27/ca/d1b2a6fef745ed18a21afa7f320477cef150374bde0cb52829948d23901d/tello_renewal-0.1.0.tar.gz",
    "platform": null,
    "description": "# Tello-Renewal\n\n[\u4e2d\u6587\u7248](README_zh.md) | [English Version](README_en.md)\n\nAutomatic renewal system for Tello mobile plans using web automation.\n\n## Features\n\n- \ud83d\udd04 Automatic plan renewal using Selenium web automation\n- \ud83d\udce7 Email notifications for success/failure\n- \ud83e\uddea Dry run mode for testing\n- \u2699\ufe0f TOML configuration with validation\n- \ud83d\udd12 Secure credential handling\n- \ud83d\udcca Comprehensive logging\n- \ud83d\udc33 Docker support (planned)\n\n## Installation\n\n### From Source\n\n```bash\n# Clone the repository\ngit clone <repository-url>\ncd tello-renewal\n\n# Install in development mode\npip install -e .\n\n# Or install from PyPI (when published)\npip install tello-renewal\n```\n\n### Requirements\n\n- Python 3.10+\n- Firefox, Chrome, or Edge browser\n- WebDriver for your chosen browser (geckodriver for Firefox)\n\n## Quick Start\n\n1. **Create configuration file:**\n\n   ```bash\n   tello-renewal config-init\n   ```\n\n2. **Edit the configuration:**\n\n   ```bash\n   # Edit config.toml with your settings\n   nano config.toml\n   ```\n\n3. **Test your configuration:**\n\n   ```bash\n   # Validate configuration\n   tello-renewal config-validate\n\n   # Test email notifications\n   tello-renewal email-test\n\n   # Check account status\n   tello-renewal status\n   ```\n\n4. **Run renewal (dry run first):**\n\n   ```bash\n   # Test renewal without actually renewing\n   tello-renewal renew --dry-run\n\n   # Perform actual renewal\n   tello-renewal renew\n   ```\n\n## Configuration\n\nThe system uses TOML configuration files. Here's a minimal example:\n\n```toml\n[tello]\nemail = \"your_email@example.com\"\npassword = \"your_password\"\ncard_expiration = \"1/25\"  # MM/YY format\n\n[smtp]\nserver = \"smtp.gmail.com\"\nport = 587\nusername = \"your_email@gmail.com\"\npassword = \"your_app_password\"\nfrom_email = '\"Tello Renewal\" <your_email@gmail.com>'\n\n[notifications]\nemail_enabled = true\nrecipients = [\"admin@example.com\"]\n```\n\n### Configuration Sections\n\n- **`[tello]`** - Tello account credentials and settings\n- **`[browser]`** - Browser automation settings\n- **`[renewal]`** - Renewal behavior configuration\n- **`[smtp]`** - Email server settings\n- **`[notifications]`** - Notification preferences\n- **`[logging]`** - Logging configuration\n\n## CLI Commands\n\n### Basic Operations\n\n```bash\n# Execute renewal\ntello-renewal renew [--dry-run]\n\n# Check account status and balance information\ntello-renewal status\n```\n\n### Configuration Management\n\n```bash\n# Create example configuration\ntello-renewal config-init [--output config.toml]\n\n# Validate configuration\ntello-renewal config-validate\n```\n\n### Testing\n\n```bash\n# Test email notifications\ntello-renewal email-test\n```\n\n### Options\n\n- `--config, -c` - Specify configuration file path\n- `--verbose, -v` - Enable verbose logging\n- `--help` - Show help information\n\n## Exit Codes\n\n| Code | Meaning             |\n| ---- | ------------------- |\n| 0    | Success             |\n| 1    | General error       |\n| 2    | Configuration error |\n| 5    | Renewal failed      |\n| 6    | Not due for renewal |\n\n## Scheduling\n\n### Cron Job\n\nAdd to your crontab to run daily:\n\n```bash\n# Run daily at 9 AM\n0 9 * * * /path/to/venv/bin/tello-renewal renew\n\n# With logging\n0 9 * * * /path/to/venv/bin/tello-renewal renew >> /var/log/tello-renewal.log 2>&1\n```\n\n### Systemd Service\n\nCreate `/etc/systemd/system/tello-renewal.service`:\n\n```ini\n[Unit]\nDescription=Tello Plan Auto Renewal\nAfter=network.target\n\n[Service]\nType=oneshot\nUser=tello\nWorkingDirectory=/opt/tello-renewal\nExecStart=/opt/tello-renewal/venv/bin/tello-renewal renew\n```\n\nCreate `/etc/systemd/system/tello-renewal.timer`:\n\n```ini\n[Unit]\nDescription=Run Tello renewal daily\nRequires=tello-renewal.service\n\n[Timer]\nOnCalendar=daily\nPersistent=true\n\n[Install]\nWantedBy=timers.target\n```\n\nEnable and start:\n\n```bash\nsudo systemctl enable tello-renewal.timer\nsudo systemctl start tello-renewal.timer\n```\n\n## Security Considerations\n\n- Store sensitive configuration files with restricted permissions (600)\n- Use app passwords for email authentication\n- Consider encrypting configuration files containing passwords\n- Run with minimal privileges\n- Regularly update dependencies\n\n## Troubleshooting\n\n### Common Issues\n\n1. **WebDriver not found:**\n\n   ```bash\n   # Install geckodriver for Firefox\n   # On Ubuntu/Debian:\n   sudo apt install firefox-geckodriver\n\n   # On macOS:\n   brew install geckodriver\n   ```\n\n2. **Login failures:**\n\n   - Verify credentials in configuration\n   - Check if Tello website structure has changed\n   - Try running with `--verbose` for detailed logs\n\n3. **Email sending failures:**\n\n   - Verify SMTP settings\n   - Use app passwords for Gmail\n   - Test with `tello-renewal email-test`\n\n4. **Browser automation issues:**\n   - Try different browser types in configuration\n   - Disable headless mode for debugging\n   - Check browser and WebDriver versions\n\n### Debug Mode\n\nRun with verbose logging to troubleshoot issues:\n\n```bash\ntello-renewal --verbose renew --dry-run\n```\n\n### Log Files\n\nCheck log files for detailed error information:\n\n```bash\ntail -f tello_renewal.log\n```\n\n## Development\n\n### Setup Development Environment\n\n```bash\n# Clone repository\ngit clone <repository-url>\ncd tello-renewal\n\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install in development mode with dev dependencies\npip install -e \".[dev]\"\n\n# Install pre-commit hooks\npre-commit install\n```\n\n### Running Tests\n\n```bash\n# Run all tests\npytest\n\n# Run with coverage\npytest --cov=tello_renewal\n\n# Run specific test file\npytest tests/test_models.py\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests for new functionality\n5. Ensure all tests pass\n6. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Disclaimer\n\nThis software is provided as-is for educational and automation purposes. Users are responsible for:\n\n- Ensuring compliance with Tello's terms of service\n- Maintaining the security of their credentials\n- Monitoring the renewal process\n- Having backup payment methods available\n\nThe authors are not responsible for any service interruptions, failed renewals, or other issues that may arise from using this software.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Tello mobile plan automatic renewal system",
    "version": "0.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/your-org/tello-renewal/issues",
        "Documentation": "https://github.com/your-org/tello-renewal#readme",
        "Homepage": "https://github.com/your-org/tello-renewal",
        "Repository": "https://github.com/your-org/tello-renewal"
    },
    "split_keywords": [
        "tello",
        " mobile",
        " renewal",
        " automation",
        " selenium"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "acd3d9f436e3ee14a8fdc841f9f40f1af980095340f320ed3778e2efc5aeec32",
                "md5": "161bbc6f4f9ecef197128f019e4b5898",
                "sha256": "787c93f5494b1538d4cfe302fd0a8d97bf7e3e79c59b8dbc1a142e4e981b414a"
            },
            "downloads": -1,
            "filename": "tello_renewal-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "161bbc6f4f9ecef197128f019e4b5898",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 25505,
            "upload_time": "2025-08-22T23:23:37",
            "upload_time_iso_8601": "2025-08-22T23:23:37.221512Z",
            "url": "https://files.pythonhosted.org/packages/ac/d3/d9f436e3ee14a8fdc841f9f40f1af980095340f320ed3778e2efc5aeec32/tello_renewal-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "27cad1b2a6fef745ed18a21afa7f320477cef150374bde0cb52829948d23901d",
                "md5": "c6c99137e6ecbd9e3e49a06645e1e22d",
                "sha256": "5632ca5ebd80d610878bf13f637de01e447ec8f68e6ef090766d8d8719b94dcc"
            },
            "downloads": -1,
            "filename": "tello_renewal-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c6c99137e6ecbd9e3e49a06645e1e22d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 25296,
            "upload_time": "2025-08-22T23:23:38",
            "upload_time_iso_8601": "2025-08-22T23:23:38.628111Z",
            "url": "https://files.pythonhosted.org/packages/27/ca/d1b2a6fef745ed18a21afa7f320477cef150374bde0cb52829948d23901d/tello_renewal-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-22 23:23:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "your-org",
    "github_project": "tello-renewal",
    "github_not_found": true,
    "lcname": "tello-renewal"
}
        
Elapsed time: 0.52054s