423,688 Members | 1,889 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,688 IT Pros & Developers. It's quick & easy.

PyAtom, a Python module for creating Atom syndication feeds

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
"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

P: n/a
> 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

P: n/a
"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

P: n/a
> 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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.