Skip to main content

MessageLane Python SDK

MessageLane is an open-source SMS campaign service for consent-aware contact imports, rate-limited sends, delivery records, a command-line interface, HTTP API, and MCP tools. This Python SDK talks to a local or hosted MessageLane API.

It exists so businesses can keep campaign operations portable while connecting approved delivery gateways only where they are needed. MessageLane itself does not provide carrier delivery. You are responsible for consent, sender-ID approval, DND requirements, and applicable messaging rules.

Install

pip install talocode-messagelane

Quickstart

Start the JavaScript service first:

messagelane serve --port 3030

Then create a consented contact and a dry-run campaign:

from talocode_messagelane import MessageLaneClient

client = MessageLaneClient()
client.import_contacts([
    {"name": "Customer", "phone": "+2349033335487", "consent": True, "tags": ["customers"]}
])
campaign = client.create_campaign(
    name="Customer update",
    sender="YOURBRAND",
    message="Your customer update goes here."
)
print(client.send_campaign(campaign["id"], dry_run=True, tag="customers"))

Auth and environment

For local MessageLane, the default base URL is http://localhost:3030. For a hosted Talocode deployment, configure:

export TALOCODE_BASE_URL=https://api.talocode.site
export TALOCODE_API_KEY=your_api_key

Create an API key at dashboard.talocode.site.

Pass the deployed MessageLane URL and API key to the client:

import os
from talocode_messagelane import MessageLaneClient

client = MessageLaneClient(
    base_url=os.environ["TALOCODE_BASE_URL"],
    api_key=os.environ["TALOCODE_API_KEY"],
)

API surface

Client method Route
import_contacts(contacts) POST /v1/messagelane/contacts/import
list_contacts() GET /v1/messagelane/contacts
pricing() GET /v1/messagelane/pricing
create_campaign(name, message, sender) POST /v1/messagelane/campaigns
send_campaign(id, dry_run=True) POST /v1/messagelane/campaigns/:id/send
delivery_report(campaign_id) GET /v1/messagelane/deliveries

MessageLane does not meter local use. Hosted pricing: contact import 2 credits, campaign creation 2 credits, campaign dispatch 5 credits, and a delivery report 1 credit. Carrier and gateway charges are separate.

Related packages

Package Install
MessageLane pip install talocode-messagelane
Tera pip install talocode-tera
Codra pip install talocode-codra
SearchLane pip install talocode-searchlane

Talocode ecosystem

Product Package
MessageLane (this package) pip install talocode-messagelane
Tera pip install talocode-tera
Codra pip install talocode-codra
SearchLane pip install talocode-searchlane
StackLane pip install talocode
Agent Browser -
ClipLoop -
InvoiceLane -

More: github.com/talocode · talocode.site · docs.talocode.site

License

MIT © Talocode

Download files

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

Source Distribution

talocode_messagelane-0.1.4.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

talocode_messagelane-0.1.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file talocode_messagelane-0.1.4.tar.gz.

File metadata

  • Download URL: talocode_messagelane-0.1.4.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.13

File hashes

Hashes for talocode_messagelane-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5a0d2779f10195a3b2de9459be56f5602d93fdfb5f3dcb6c403fa535ae2efbf6
MD5 76331deb0f6fd9e6a357e53ceeebf043
BLAKE2b-256 85fbc870188f31a442c42ad97456738a5796e5b13a30b252ce91252e7245a912

See more details on using hashes here.

File details

Details for the file talocode_messagelane-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for talocode_messagelane-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6d4059f0b4e8f4019186777f08e6880c5fa88f542d1f25b3d846a63f8ecbdac1
MD5 304ebf2272c0a069af745fece1d1e7ba
BLAKE2b-256 20140a917869581cdc677a1e373db7d92faa54f254e0c61891566e8eb6031fdc

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 Sentry Error logging StatusPage Status page