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
Metadata
Release files for talocode-messagelane 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| talocode_messagelane-0.1.4.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| talocode_messagelane-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 kB
Release files / talocode_messagelane-0.1.4.tar.gz
| Download URL | talocode_messagelane-0.1.4.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a0d2779f10195a3b2de9459be56f5602d93fdfb5f3dcb6c403fa535ae2efbf6
|
|
BLAKE2b-256 checksum How to use checksums |
85fbc870188f31a442c42ad97456738a5796e5b13a30b252ce91252e7245a912
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.13
|
Release files / talocode_messagelane-0.1.4-py3-none-any.whl
| Download URL | talocode_messagelane-0.1.4-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d4059f0b4e8f4019186777f08e6880c5fa88f542d1f25b3d846a63f8ecbdac1
|
|
BLAKE2b-256 checksum How to use checksums |
20140a917869581cdc677a1e373db7d92faa54f254e0c61891566e8eb6031fdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.13
|