Git Product home page Git Product logo

simple_login_delete_batch's Introduction

SimpleLogin Alias Deletion Tool

This Python script allows you to delete aliases from your SimpleLogin account based on specified masks. It utilizes the SimpleLogin API to retrieve and delete aliases matching the provided masks.

Prerequisites

  • Python 3.7 or higher
  • requests library
  • python-dotenv library

Installation

  1. Clone the repository or download the script file.

  2. Install the required dependencies by running the following command:

    pip install -r requirements.txt
    
  3. Create a .env file in the same directory as the script and provide the following variables:

    API_KEY=your_simplelogin_api_key
    API_URL=https://app.simplelogin.io/api
    MASKS=mask1,mask2,mask3
    

    Replace your_simplelogin_api_key with your actual SimpleLogin API key, and specify the desired masks separated by commas.

Usage

  1. Open a terminal or command prompt and navigate to the directory containing the script.

  2. Run the script using the following command:

    python script_name.py
    

    Replace script_name.py with the actual name of the script file.

  3. The script will start the alias deletion process and display log messages indicating the progress.

  4. Once the process is completed, the script will generate a deletion_result.json file in the same directory. This file will contain the following information:

    • deleted_aliases: List of aliases that were successfully deleted.
    • total_deleted: Total number of aliases deleted.
    • pages_processed: Number of pages processed during the deletion process.

Customization

  • You can modify the masks by updating the MASKS variable in the .env file. Separate multiple masks with commas.

  • The script includes a small delay of 1 second between each deletion request to avoid hitting rate limits. You can adjust this delay by modifying the time.sleep(1) line in the delete_aliases_by_mask function.

Note

  • Exercise caution when using this script, as the deleted aliases cannot be recovered.

  • Ensure that you have a valid SimpleLogin API key with the necessary permissions to delete aliases.

  • The script assumes that the SimpleLogin API endpoints and authentication method remain the same. If there are any changes in the API, you may need to update the script accordingly.

simple_login_delete_batch's People

Contributors

4erdenko avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.