Skip to main content

A Python package/cli to interact with addy.io

Project description

pyaddy

A Python cli to interact with addy.io

How to use

  • In your python environment install the package - e.g. using poetry
  • poetry add pyaddy
  • addy --help
  • You must first run the load-key cmd otherwise all other cmds will fail

Basic Usage

Usage: addy [OPTIONS] COMMAND [ARGS]...

    Entry point for the cli

Options:
   --version Show the version and exit.
   --help Show this message and exit.

Commands:
activate-alias:
Activate an alias. Pass ID of alias to activate

bulk-activate-aliases:
Bulk activate list of aliases. Supply a comma-seperated list of alias IDs -e.g. ID1, ID2

bulk-deactivate-aliases:
Bulk deactivate list of aliases. Supply a comma-seperated list of alias IDs -e.g. ID1, ID2

bulk-delete-aliases:
Bulk delete list of aliases. Supply a comma-seperated list of alias IDs -e.g. ID1, ID2

bulk-restore-aliases:
Bulk restore list of aliases. Supply a comma-seperated list of alias IDs -e.g. ID1, ID2

create-new-alias:
see --help for all options

deactivate-alias:
Deactivate alias. Pass ID of alias to activate

delete-specific-alias:
Delete an alias. Pass ID of alias to delete

forget-specific-alias:
Forget an alias. Pass ID of alias to forget

get-account-details:
Get all account details associated with api key

get-all-aliases:
Default: Get details about all ACTIVE aliases SORTED by CREATED_AT. --help to see all options and filtering

get-api-details:
Get api details to confirm key is valid

get-bulk-aliases:
Get detailed info on aliases. Supply a comma-seperated list of alias IDs -e.g. ID1, ID2

get-specific-alias: \ Get details about a specific alias

load-key:
Supply your addy api-key

update-specific-alias:
Update a specific alias descprition and from_name. Pass ID of alias

Commands

load-key

addy load-key addy_io_key 

Key saved

active-alias

addy activate-alias 50c9e585-e7f5-41c4-9016-9014c15454bc

 {
    "data": {
        "id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
        "user_id": "7944df11-09bf-48e9-a78f-13585c923bf3",
        "aliasable_id": null,
        "aliasable_type": null,
        "local_part": "pyaddy",
        "extension": null,
        "domain": "addymail.com",
        "email": "py.addy@addymail.com",
        "active": true,
        "description": "pyaddy email",
        "from_name": null,
        "emails_forwarded": 1,
        "emails_blocked": 0,
        "emails_replied": 0,
        "emails_sent": 1,
        "recipients": [],
        "created_at": "2023-10-31 16:10:06",
        "updated_at": "2023-11-11 22:17:30",
        "deleted_at": null
    }
}

bulk-activate-aliases

addy bulk-activate-aliases 50c9e585-e7f5-41c4-9016-9014c15454bc,c549db7d-5fac-4b09-9443-9e47f644d29f

Bulk Activated Aliases Info: 
 {
    "message": "2 aliases activated successfully",
    "ids": [
        "50c9e585-e7f5-41c4-9016-9014c15454bc",
        "c549db7d-5fac-4b09-9443-9e47f644d29f"
    ]
}

bulk-deactivate-aliases

addy bulk-deactivate-aliases c549db7d-5fac-4b09-9443-9e47f644d29f,50c9e585-e7f5-41c4-9016-9014c15454bc7
Bulk Deactivated Aliases Info: 
 {
    "message": "2 aliases deactivated successfully",
    "ids": [
        "c549db7d-5fac-4b09-9443-9e47f644d29f",
        "50c9e585-e7f5-41c4-9016-9014c15454bc"
    ]
}

bulk-delete-aliases

addy bulk-delete-aliases c549db7d-5fac-4b09-9443-9e47f644d29f,50c9e585-e7f5-41c4-9016-9014c15454bc
Bulk Deactivated Aliases Info: 
 {
    "message": "2 aliases deactivated successfully",
    "ids": [
        "c549db7d-5fac-4b09-9443-9e47f644d29f",
        "50c9e585-e7f5-41c4-9016-9014c15454bc"
    ]
}

bulk-restore-aliases

addy bulk-restore-aliases c549db7d-5fac-4b09-9443-9e47f644d29f,50c9e585-e7f5-41c4-9016-9014c15454bc
Bulk Restore Aliases Info: 
 {
    "message": "2 aliases restored successfully",
    "ids": [
        "c549db7d-5fac-4b09-9443-9e47f644d29f",
        "50c9e585-e7f5-41c4-9016-9014c15454bc"
    ]
}

create-new-alias

addy create-new-alias
Create New Alias Info: 
 {
    "data": {
        "id": "8401cb92-05b0-4fc6-95a0-1e892d50d9a4",
        "user_id": "7944df11-09bf-48e9-a78f-13585c923bf3",
        "aliasable_id": null,
        "aliasable_type": null,
        "local_part": "frayed.jacket4",
        "extension": null,
        "domain": "addymail.com",
        "email": "frayed.jacket4@addymail.com",
        "active": true,
        "description": null,
        "from_name": null,
        "emails_forwarded": 0,
        "emails_blocked": 0,
        "emails_replied": 0,
        "emails_sent": 0,
        "recipients": [],
        "created_at": "2023-11-12 19:27:26",
        "updated_at": "2023-11-12 19:27:26",
        "deleted_at": null
    }
}

deactivate-alias

addy deactivate-alias 8401cb92-05b0-4fc6-95a0-1e892d50d9a4

Deactivated 8401cb92-05b0-4fc6-95a0-1e892d50d9a4

delete-specific-alias

addy delete-specific-alias 8401cb92-05b0-4fc6-95a0-1e892d50d9a4

Deleted 8401cb92-05b0-4fc6-95a0-1e892d50d9a4

forget-specific-alias

addy forget-specific-alias 50c9e585-e7f5-41c4-9016-9014c15454bc

Forgot 50c9e585-e7f5-41c4-9016-9014c15454bc

get-account-details

addy get-account-details

Account Details:
{
    "data": {
           "id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
            "username": "johndoe",
            "from_name": "John Doe",
            "email_subject": "Private Subject",
            "banner_location": "off",
            "bandwidth": 10485760,
            "username_count": 2,
            "username_limit": 3,
            "default_recipient_id": "46eebc50-f7f8-46d7-beb9-c37f04c29a84",
            "default_alias_domain": "anonaddy.me",
            "default_alias_format": "random_words",
            "subscription": "pro",
            "subscription_ends_at": null,
            "bandwidth_limit": 0,
            "recipient_count": 12,
            "recipient_limit": 20,
            "active_domain_count": 4,
            "active_domain_limit": 10,
            "active_shared_domain_alias_count": 50,
            "active_shared_domain_alias_limit": 0,
            "active_rule_count": 4,
            "active_rule_limit": 5,
            "total_emails_forwarded": 488,
            "total_emails_blocked": 6,
            "total_emails_replied": 95,
            "total_emails_sent": 17,
            "total_aliases": 529,
            "total_active_aliases": 481,
            "total_inactive_aliases": 19,
            "total_deleted_aliases": 29,
            "created_at": "2019-10-01 09:00:00",
            "updated_at": "2019-10-01 09:00:00"
    }
}

get-all-aliases

addy get-all-aliases

All Aliases: 
 {
    "data": [
        {
            "id": "ff27c17f-b94b-4752-9233-7004a9f53357",
            "user_id": "7944df11-09bf-48e9-a78f-13585c923bf3",
            "aliasable_id": null,
            "aliasable_type": null,
            "local_part": "campus.proclaim40",
            "extension": null,
            "domain": "addymail.com",
            "email": "campus.proclaim40@addymail.com",
            "active": true,
            "description": "ayg screenshot",
            "from_name": null,
            "emails_forwarded": 1,
            "emails_blocked": 0,
            "emails_replied": 0,
            "emails_sent": 1,
            "created_at": "2023-09-21 16:10:06",
            "updated_at": "2023-11-12 19:17:14",
            "deleted_at": null
        },
        {
            "id": "8eb05144-d0a4-4650-8999-5f078b394907",
            "user_id": "7944df11-09bf-48e9-a78f-13585c923bf3",
            "aliasable_id": null,
            "aliasable_type": null,
            "local_part": "aim.entire33",
            "extension": null,
            "domain": "addymail.com",
            "email": "aim.entire33@addymail.com",
            "active": true,
            "description": "kobe post three specials at once",
            "from_name": null,
            "emails_forwarded": 0,
            "emails_blocked": 0,
            "emails_replied": 0,
            "emails_sent": 1,
            "created_at": "2023-09-19 18:03:57",
            "updated_at": "2023-11-12 19:17:14",
            "deleted_at": null
        },
        {
            "id": "efe6a55a-d145-4936-af1b-437ce3dc463d",
            "user_id": "7944df11-09bf-48e9-a78f-13585c923bf3",
            "aliasable_id": null,
            "aliasable_type": null,
            "local_part": "canopy.stamina198",
            "extension": null,
            "domain": "addymail.com",
            "email": "canopy.stamina198@addymail.com",
            "active": true,
            "description": "golden tickets three specials at once",
            "from_name": null,
            "emails_forwarded": 0,
            "emails_blocked": 0,
            "emails_replied": 0,
            "emails_sent": 0,
            "created_at": "2023-09-19 17:59:44",
            "updated_at": "2023-09-19 17:59:44",
            "deleted_at": null
        },
        "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "https://app.addy.io/api/v1/aliases?filter%5Bactive%5D=true&sort=-created_at&page%5Bnumber%5D=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "https://app.addy.io/api/v1/aliases",
        "per_page": 100,
        "to": 3,
        "total": 3
    }
}

get-api-details

addy get-api-details
API details: {
    "name": "Firefox Extension",
    "created_at": "2019-10-01 09:00:00",
    "expires_at": null
}

get-bulk-aliases

addy get-bulk-aliases 50c9e585-e7f5-41c4-9016-9014c15454bc c549db7d-5fac-4b09-9443-9e47f644d29f

Detailed Aliases Info:
{
    "data": [
        {
            "id": "50c9e585-e7f5-41c4-9016-9014c15454bc",
            "user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
            "aliasable_id": null,
            "aliasable_type": null,
            "local_part": "first",
            "extension": null,
            "domain": "johndoe.anonaddy.com",
            "email": "first@johndoe.anonaddy.com",
            "active": true,
            "description": null,
            "from_name": null,
            "emails_forwarded": 5,
            "emails_blocked": 0,
            "emails_replied": 0,
            "emails_sent": 0,
            "recipients": [],
            "created_at": "2019-10-01 09:00:00",
            "updated_at": "2019-10-01 09:00:00",
            "deleted_at": null
        },
        {
            "id": "c549db7d-5fac-4b09-9443-9e47f644d29f",
            "user_id": "ca0a4e09-c266-4f6f-845c-958db5090f09",
            "domain_id": null,
            "local_part": "second",
            "extension": null,
            "domain": "johndoe.anonaddy.com",
            "email": "second@johndoe.anonaddy.com",
            "active": true,
            "description": null,
            "from_name": null,
            "emails_forwarded": 2,
            "emails_blocked": 1,
            "emails_replied": 0,
            "emails_sent": 0,
            "recipients": [],
            "created_at": "2019-10-01 09:00:00",
            "updated_at": "2019-10-01 09:00:00",
            "deleted_at": null
        }
    ]
}

get-specific-alias

addy get-specific-alias

Alias Info: 
 {
    "data": {
        "id": "8eb05144-d0a4-4650-8999-5f078b394907",
        "user_id": "7944df11-09bf-48e9-a78f-13585c923bf3",
        "aliasable_id": null,
        "aliasable_type": null,
        "local_part": "aim.entire33",
        "extension": null,
        "domain": "addymail.com",
        "email": "aim.entire33@addymail.com",
        "active": true,
        "description": "kobe post three specials at once",
        "from_name": null,
        "emails_forwarded": 0,
        "emails_blocked": 0,
        "emails_replied": 0,
        "emails_sent": 1,
        "recipients": [],
        "created_at": "2023-09-19 18:03:57",
        "updated_at": "2023-11-12 19:17:14",
        "deleted_at": null
    }
}

update-specific-alias

addy update-specific-alias 8eb05144-d0a4-4650-8999-5f078b394907 --description "PyAddy Cli"

Updated 8eb05144-d0a4-4650-8999-5f078b394907 Info: 
 {
    "data": {
        "id": "8eb05144-d0a4-4650-8999-5f078b394907",
        "user_id": "7944df11-09bf-48e9-a78f-13585c923bf3",
        "aliasable_id": null,
        "aliasable_type": null,
        "local_part": "aim.entire33",
        "extension": null,
        "domain": "addymail.com",
        "email": "aim.entire33@addymail.com",
        "active": true,
        "description": "PyAddy Cli",
        "from_name": null,
        "emails_forwarded": 0,
        "emails_blocked": 0,
        "emails_replied": 0,
        "emails_sent": 1,
        "recipients": [],
        "created_at": "2023-09-19 18:03:57",
        "updated_at": "2023-11-12 20:51:49",
        "deleted_at": null
    }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyaddy-0.4.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyaddy-0.4.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file pyaddy-0.4.0.tar.gz.

File metadata

  • Download URL: pyaddy-0.4.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.11.6 Linux/5.15.90.1-microsoft-standard-WSL2

File hashes

Hashes for pyaddy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d42e01698c2940857d9e4b0975448c3ca5139d76732f69cc05c592f3d1c58c43
MD5 9bb525bca7546690a3c15c54c5122f48
BLAKE2b-256 d5e3d7949f4b4a127493a5ff59eca4613152c4ca6aaf8a832c106b9829e4af52

See more details on using hashes here.

File details

Details for the file pyaddy-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pyaddy-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.11.6 Linux/5.15.90.1-microsoft-standard-WSL2

File hashes

Hashes for pyaddy-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f754b93fda0c297837446d97ccbc74227217299c7a7777c55da7994363a84e6c
MD5 e4f6b296a33cfc815f6323bace9865b7
BLAKE2b-256 4227984ae8167c7b308b1725fd1737d6647442eac26a06497060979875702c15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page