What is convenient way of parsing rfc3339 in python?

80 views Asked by At

I found several ways of doing it and found a lot of answers/articles and all of them offer different ways:

a) Using dateutil.parser.isoparse. This package is mentioned in datetime documentation as package for parsing ISO 8601 format and I guess, it would have been the answer to my question, but I guess there is possibility of getting case that suits rfc3339 and not ISO 8601.

b) Using pyrfc3339 is also third-party project which seems fine and easy to use, but I didn't find it to be mentioned much

c) A lot of other packages

  1. So what is convenient way of parsing rfc3339?
  2. Are there some hidden problems in options above?
1

There are 1 answers

0
Nikolaj Š. On

Are you sure datetime.datetime.fromisoformat() wouldn't work for your use case(s)?