Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
Just wondering if there is a Python MTA. I took a look at smtpd but they all look like forwarders without any functionality.
Yes, Twisted includes a framework for building SMTP servers. There's a simple Twisted-based email server available here (also see here for some information about its development).
If you want something closer to a mail application server, there's Lamson.
If you're looking for a full MTA solution you should check out http://slimta.org/ or as previously mentioned here http://lamsonproject.org
I myself has experimented a bit with slimta and it seems to work well.
It's pretty new, so nothing like the maturity of Twisted's SMTP, but there's also Lamson.
Blackhole is an MTA (message transfer agent) that (figuratively) pipes all mail to /dev/null, built on top of asyncio and utilises async def and await statements available in Python 3.5.
While Blackhole is an MTA, none of the actions performed via SMTP or SMTPS are actually processed, and no email is delivered. You can tell Blackhole how to handle mail that it receives. It can accept all of it, bounce it all, or randomly do either of those two actions.
Think of Blackhole sort of like a honeypot in terms of how it handles mail, but it’s specifically designed with testing in mind.
Documentation
You can find the latest documentation here.
Changelog
You can find a list of changes on the blackhole website. https://kura.github.io/blackhole/changelog.html
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I've search a little bit on net about urllib library in python 2.7, due to my friend's tip and because I've already used for a while. Well, what I really wanna know is about indications. Supposing I desire to create a application that is going to be used in a specific device that communicates with another device with same application, e.g A message application, or even a virtual simple game (using only the network), what are the possible libraries I can use? If some of you've already used anything to build a similar application, please, I'll appreciate your knowledge.
It sounds like you want to develop an application specific protocol which is different than HTTP.
HTTP is carried over TCP and Python connects to TCP transports with the standard socket module. There is a small overview of the use of sockets in the Python standard documentation.
The most important part of your new protocol is ensuring each side knows when the other side has sent a complete message. This can be very simple (each message ends with a newline) to as complex as you need.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have no experience doing anything like this, but I want to make a little email server that will only be accessed from the local machine through the Mail app in OS X. I know that the Mail app lets you connect to an email server with the POP3 protocol, and I have a reference manual on POP3 so I know how it all needs to work. I am just not sure of the best way to write this. I know python has smtpd, which I can use for receiving mail from the Mail app. Can I just use the SocketServer module, subclass BaseRequestHandler, read from the self.request socket until I get a CRLF, split the data by spaces, then use the first item in the list as keyword and apply the corresponding function to the rest of the list, and finally return the status + results? Or is it more complicated than that?
--EDIT--
I forgot to mention that I wanted to do this in pure python.
Implementing protocols and a working server is always more complicated than "just a few lines of code". Try twisted It has implementations for many internet protocols and working examples. Here's an example: http://pepijndevos.nl/twisted-pop3-example-server/
You can use pypopper python recipe to readily implement the pop3 server functionality.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am working on a homework project for a Networking class where we have to build a simple web based chat server in either C/C++ or Python. I chose Python because I thought it would be an easier language to implement the project in. We can use any material we find on the web, because it most likely won't have all the functionality that the project requires. In fact, the professor actually encouraged us to use material from the web including tutorials. He's not testing us on our ability to code rather our ability to implement networking code, and whether or not we fully understand the processes involved.
The project must handle multiple clients, and must be able to support multiple browsers, chrome, firefox, etc. A user needs to be able to type in an IP Address and a Port in the browser to connect. I just can't find any material to work with. I have found a little in C but nothing in Python.
Does anyone know of any complete tutorials out there? There are plenty for client/server command-based chats, but no browser based chats.
You can look at using TornadIO. Its a python implementation of Socket.io, for Tornado, Tornado is an event-driven python web server.
https://github.com/MrJoes/tornadio2
http://www.tornadoweb.org/
Socket.io is a cross-browser solution to socket/socket-like connections from the web client to the server. This will pretty much give you all the tools you need to do a chat server since it supports pub-sub subscriptions and messages. The nice thing about using socket.io for your purposes is that it tries a number of transports in order to ensure that new and old browsers can all communicate: Websocket, Flashsocket, xhr polling, jsonp, htmlfile. They all are attempted and used in a way that looks the same to the client.
Tornadio2 is the newer version that is compatible with the newer Socket.io 0.7+. This version added a lot of features that broke compatibility with 0.6. However, the original TornadIO contains a chatroom example which you could review and translate pretty easily to the newer version to get you started:
https://github.com/MrJoes/tornadio/tree/master/examples/chatroom
As far as I can understand, the home work given is let people gets hands on activity with network programming. So might take a look at www.twistedmatrix.com, few example use case of twisted
Chat comet site using python and twisted,
http://lists.canonical.org/pipermail/kragen-hacks/2005-April/000409.html,
http://code.google.com/p/twisted-chat-example/.
This one uses plain socket programming http://code.activestate.com/recipes/531824-chat-server-client-using-selectselect/,
http://ankurs.com/2008/05/creating-a-simple-chat-application-with-python/.
This one is based on gevent.
For simple chat room emulation without use of socket programming, here is the example gummi.
A real life use case at sourceforge.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there any production ready open source twitter clones written in Ruby or Python ?
I am more interested in feature rich implementations, not just bare bones twitter like messages (e.g.: APIs, FBconnect, Notifications, etc)
Thanks !
I know of twissandra which is an open source clone. Of course I doubt it meets your need of feature rich implementations.
http://github.com/rnielsen/twetter
From their readme:
Twetter is an implementation of the twitter.com API, designed for use in situations where internet access is not available but a large number of people have twitter clients and want to tell each other what they are doing, for example a RailsCamp, where it was first developed.
The current goal is to have it work with as many third party twitter clients as possible. It has currently been tested with Twitterific, TwitterFox, and Spaz on OSX.
The following open source alternative to twitter : http://identi.ca/ is written using the the software http://status.net/ . It looks like it is written in PHP too.
Also there is http://code.google.com/p/jaikuengine/ which is a microblogging platform for google app engine. This should serve as an example for python implementation.
Also look at http://www.typepad.com/go/motion/
Found two relevant projects:
http://github.com/insoshi/insoshi
http://github.com/dmitryame/echowaves/wiki
Sadly both appear discontinued
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm looking for a library that can help me build a good XMLRPC server in Python that could run on Windows. The SimpleXMLRPCServer class looks fine but I don't know if it will suit all my needs, since I'd like to be able to connect from multiple clients at the same time. I found this on GitHub, but I don't know if it'll work.
Any suggestions/ideas?
I like CherryPy for XMLRPC using the built-in tool/dispatcher, and it runs on Windows as far as I know.
But you really need to ask yourself why you want to do RPC vs. a RESTful service in 2010. XMLRPC is very limited in the variable types allowed, and adds significant encapsulation overhead, and requires a client that can talk XMLRPC.
I also like CheeyPy, but have also used Twisted for such needs. Pretty simple to use and Twisted has defereds and helper functions like deferToThread and callLater to allow for blocking code to act in a non-blocking fashion.
Take a look at http://twistedmatrix.com/documents/current/web/howto/xmlrpc.html for a simple example.
I like to use circuits for stuff like this (but it's not for everyone). There's a simple example in the examples/web/ directory in the source repository.