Skip to main content

An AIM client library for python.

Project description

AIM Client Using OSCAR Protocol

This project implements an AIM (AOL Instant Messenger) client using the OSCAR protocol. The code facilitates connecting to the AIM service, sending and receiving instant messages, and provides the groundwork for further functionality.

Features

  • Connect to AIM servers: The client allows users to authenticate and establish a connection to AIM servers.
  • Send/Receive Instant Messages: The client can send and receive messages to/from other AIM users in real time.

Getting Started

Installing

pip install aimpyfly

Example: Connecting, Sending, and Receiving Messages

This script demonstrates how to connect to the AIM server, log in with your credentials, send a message to another user, and receive incoming messages.

import asyncio
import logging
from aimpyfly import aim_client

# Define a callback for handling incoming messages
async def message_received(sender, message):
    print(f"New message received from {sender}: {message}")

async def main():
    # Initialize the AIM client with your credentials and server details
    client = aim_client.AIMClient(server="<server>", port=5190, username="<screenname>", password="<password>", loglevel=logging.<LEVEL>)

    # Set the callback to handle incoming messages
    client.set_message_callback(message_received)

    # Connect to the AIM server
    await client.connect()

    # Send a message to another AIM user
    await client.send_message("ukozi", "Hello! This message was sent using the AIM Python client.")

    # Keep the client running to handle and process incoming messages
    await client.process_incoming_packets()

if __name__ == "__main__":
    asyncio.run(main())

What This Does:

  • Connects to the AIM server using your provided server, username, and password.
  • Sends a message to a specific AIM username (`ukozi`).
  • Listens for incoming messages and prints them when received.
  • The client will keep running, allowing real-time message exchanges with other AIM users.

Current Work in Progress

I'm actively working on extending this client to support additional features:

  • Join and interact with AIM chatrooms
  • Viewing user profiles
  • Setting the profile of python client
  • Viewing away messages
  • Setting the way message of the python client
  • Selecting client type.

I encourage contributions to help build out this functionality!

Logging

The code includes detailed logging, which can be useful for debugging and understanding the network communication between the client and the AIM servers. Log messages include information about sent and received FLAP and SNAC packets. To set logging verbosity, pass loglevel=logging.<LEVEL> when creating an instance of AIMClient.

Acknowledgments

Special thanks to:

Contributing

If you'd like to submit your own improvements:

  1. Fork the repository.
  2. Create a new branch for your feature (`git checkout -b feature/new-feature`).
  3. Commit your changes (`git commit -m 'Add new feature'`).
  4. Push to your branch (`git push origin feature/new-feature`).
  5. Open a pull request for review.

License

This project is licensed under the MIT License.

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

aimpyfly-0.1.1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

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

aimpyfly-0.1.1-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file aimpyfly-0.1.1.tar.gz.

File metadata

  • Download URL: aimpyfly-0.1.1.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for aimpyfly-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2aca5afb386ba1f919676514b3adb459727b6828a3713ad2bad75bc3c905ec10
MD5 63fe1e055330005aa3d58f5891c56eb0
BLAKE2b-256 8ea7f86d979d54efff7ab51d72f2e79d0938e720ba937deb8802f3e408788bfb

See more details on using hashes here.

File details

Details for the file aimpyfly-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aimpyfly-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for aimpyfly-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 34bddc94995cdd87613bac0bbe3b647da27dfd22672b27f341dffbefcb22fc50
MD5 36a2bd01a5085c3b02fa4fea972b6900
BLAKE2b-256 37f5a96e95abd343cbc969768e6e629c75817e7812816f707b439148e16a7190

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