Skip to content

dnet/sympa-python-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sympa Python API

Usage

The sympa module offers the Sympa class, which represents a Sympa node. The constructor takes only one parameter, the URL of the site, and then the login method can be used to authenticate with an e-mail address and password. Currently, supported functionality includes a read-only access to shared files (listing and reading).

>>> from sympa import Sympa
>>> s = Sympa()
>>> s.log_in('https://db.bme.hu/lists', 'username', 'password')
>>> a.lists
{'konzi.adatlabor': <MailingList "konzi.adatlabor">}

Also, the sympafs module can be used to mount the shared files of mailing lists to the file system using FUSE (Linux, Mac OS X and FreeBSD are supported).

$ python sympafs.py https://db.bme.hu/lists username konzi.adatlabor /tmp/sympa
Password:
$ ls -la /tmp/sympa
total 16
dr-xr-xr-x  2 root root     0 Mar 25 22:23 .
drwxrwxrwx 18 root root 16384 Mar 25 22:20 ..
dr-xr-xr-x  2 root root     0 Feb 14  2005 2002
dr-xr-xr-x  2 root root     0 Feb 14  2005 2003
...
$ fusermount -u /tmp/sympa

Known limitations (TODO)

  • Shared files access is read-only
  • SympaFS caching is naive: freshness is not checked, and there's no garbage collection
  • The result of a timed out session is unkown
  • The contents of the page is not checked for error messages

License

The whole project is licensed under MIT license.

Dependencies

Releases

No releases published

Packages

No packages published

Languages