473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

PyAtom, a Python module for creating Atom syndication feeds

Hello. I have written a module called PyAtom. It is designed to make it
really easy to create an Atom syndication feed.

Atom is a format similar to RSS, but with some additional features.

http://atomenabled.org/developers/syndication/
From my Google searches, I think the name "PyAtom" is available, so I have
been calling my module by that name. If this is a bad name, please let me
know, and I'll change it.

I intend to donate this to the Python Software Foundation, so I have
released it under the terms of the Academic Free License 2.1.

You can download it from here:

http://www.blarg.net/~steveha/pyatom.tar.gz
The file includes a readme.txt file with a few notes, and pyatom.py.

I had a great time writing this. Please let me know what you think of it.
Comment here in comp.lang.python, or send email to me. I have created a
special email address just for PyAtom questions and comments:

py****@langri.com
P.S. Should I publish this to the Cheese Shop?

http://cheeseshop.python.org/

--
Steve R. Hastings "Vita est"
st***@hastings.org http://www.blarg.net/~steveha

Feb 23 '06 #1
5 3342
"Steve R. Hastings" <st***@hastings.org> writes:
I intend to donate this to the Python Software Foundation, so I have
released it under the terms of the Academic Free License 2.1.

You can download it from here:

http://www.blarg.net/~steveha/pyatom.tar.gz
The file includes a readme.txt file with a few notes, and pyatom.py.


Very interesting, I was looking forward to something like that in the past and
found atomixlib but it has heavy dependencies. Yours seems nicer. Anyway, you
don't follow PEP 8 guidelines and AFAIK a module must be widespread and used by
the community before can be accepted in the Python core. The same happened with
Lundh's ElementTree

Good job :)

--
Lawrence - http://www.oluyede.org/blog
"Anyone can freely use whatever he wants but the light at the end
of the tunnel for most of his problems is Python"
Feb 23 '06 #2
> you don't follow PEP 8 guidelines

Why do you say this? I don't think the code is perfectly polished and
ready to be called version 1.0, but I think it follows PEP 8 more than not.

and AFAIK a module must be widespread and used by
the community before can be accepted in the Python core.
I said I intend to donate it to PSF. I didn't say they would do anything
with it... :-) That's up to them, of course.

Good job :)


Thank you.
--
Steve R. Hastings "Vita est"
st***@hastings.org http://www.blarg.net/~steveha

Feb 23 '06 #3
"Steve R. Hastings" <st***@hastings.org> writes:
Why do you say this? I don't think the code is perfectly polished and
ready to be called version 1.0, but I think it follows PEP 8 more than not.


docstrings of method are messed up (why you begin them from the column 0?)

and

"
Function Names

Function names should be lowercase, with words separated by underscores
as necessary to improve readability.

mixedCase is allowed only in contexts where that's already the
prevailing style (e.g. threading.py), to retain backwards compatibility.
"

you use ThisCase for methods, quit ugly IMHO

--
Lawrence - http://www.oluyede.org/blog
"Anyone can freely use whatever he wants but the light at the end
of the tunnel for most of his problems is Python"
Feb 23 '06 #4
> docstrings of method are messed up (why you begin them from the column 0?)

Well, it seemed like a good idea at the time.

I wanted all my docstrings to look nice in an 80-column terminal
emulator, and it's easy to format them to similar lengths when they all
start in the same column. My standard is to use up to 72 columns for
line lengths.

When you have a class, which contains a function, which has a docstring,
the docstring is indented at least 3 levels. If you then use 72 columns,
the strings will wrap in the source code.

All that said, if the community doesn't do it this way, I'll go ahead and
change it. It seemed like a good way to go but I'm not combative about it.

Function Names

Function names should be lowercase, with words separated by underscores
as necessary to improve readability.

mixedCase is allowed only in contexts where that's already the
prevailing style (e.g. threading.py), to retain backwards compatibility.


Oh, right. I do have some mixed-case function names; I guess I'd better
rename them right away.

By the way, I started PyAtom as a learning project. Now that it's done I
want to share it, but I didn't study PEP 8 very much before I started it.

Thank you for the feedback.
--
Steve R. Hastings "Vita est"
st***@hastings.org http://www.blarg.net/~steveha

Feb 23 '06 #5
I have edited PyAtom, and now it should be in better conformance with the
PEP 8 guidelines. It is available from the same place as before:

http://www.blarg.net/~steveha/pyatom.tar.gz

--
Steve R. Hastings "Vita est"
st***@hastings.org http://www.blarg.net/~steveha

Feb 24 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. ...
0
by: Andy Dingley | last post by:
I'm just building my first Atom feeds (at http://gamesradar.com/rss/ps2/ should you care ) One of the requirements here is to include lots of rich media (screenshots) with each entry. There...
8
by: Paul Cochrane | last post by:
Hi all, I've got an application that I'm writing that autogenerates python code which I then execute with exec(). I know that this is not the best way to run things, and I'm not 100% sure as to...
1
by: Xiao Jianfeng | last post by:
Hello, In pymol I can use "from chempy import Atom" but "import chempy.Atom" doesn't work. It says,"ImportError: No module named Atom". What is going wrong ? Thanks
0
by: banjolibrarian | last post by:
I have been setting up RSS and Atom feeds for our library's podcasts. The RSS feed works fine, but when I subscribe to the Atom feed (via Bloglines), the link to the file itself defaults to...
0
by: Steve R. Hastings | last post by:
xe.py is a Python module to make it very easy to work with XML. I have attempted to make xe classes very Pythonic and intuitive. xe is intended for working with structured XML, such as...
0
by: S.T | last post by:
Hi! I've spend this weekend trying and coding a php-based atom- and rss-feed writer. I don't know if this is the right place for my questions. However, since both feeds are based on xml, maybe...
2
by: Brent | last post by:
I'm new to XML namespaces, and I seem to be missing something obvious in this code snippet, which is trying to retrieve the feed/entry nodes from an XPathNavigator document: XmlNamespaceManager...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.