Visit our site to listen to past episodes, support the show, and sign up for our mailing list.
Summary
The Python AST (Abstract Syntax Tree) is a powerful abstraction that allows for a number of innovative projects. ASTroid is a library that provides additional convenience methods to simplify working with the AST. In this episode we spoke with Sylvain Thénault from Logilab about his work on ASTroid and how it is used to power the popular PyLint static analysis tool.
Brief Introduction
- Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.
- Subscribe on iTunes, Stitcher, TuneIn or RSS
- Follow us on Twitter or Google+
- Give us feedback! Leave a review on iTunes, Tweet to us, send us an email or leave us a message on Google+
- I would like to thank everyone who has donated to the show. Your contributions help us make the show sustainable. For details on how to support the show you can visit our site at pythonpodcast.com
- I would also like to thank Hired, a job marketplace for developers, for sponsoring this episode of Podcast.__init__. Use the link hired.com/podcastinit to double your signing bonus.
- Linode is sponsoring us this week. Check them out at linode.com/podcastinit and get a $10 credit to try out their fast and reliable Linux virtual servers for your next project
- We are recording today on November 23rd, 2015 and your hosts as usual are Tobias Macey and Chris Patti
- Today we are interviewing Sylvain Thénault about ASTroid
Interview with Sylvain Thénault
- Introductions
- How did you get introduced to Python? – Chris
- Can you explain what an Abstract Syntax Tree is and why it is a useful language feature? – Tobias
- What was your inspiration for creating ASTroid? – Chris
- What features does ASTroid offer over Python’s standard AST package, and what makes those features important? – Chris
- I know that the ASTroid package is used in Pylint which is also maintained by Logilab. How does the AST facilitate static analysis of Python projects and are there cases where you have to fall back to text parsing? – Tobias
- Beyond static analysis, what are some of the other possible uses for the Python AST? – Tobias
- The documentation for the AST package in Python mentions that the specific syntax objects in the tree are subject to change between releases. Does the ASTroid package provide any abstractions to maintain a consistent API between versions or does it just provide a pass-through? – Tobias
- Have you encountered any challenges in testing ASTroid given that it operates at such a low level in the language? – Chris
- Do you have trouble attracting contributors given the great understanding of Python’s inner working required? – Chris
- Does the implementation or representation of the AST differ between different distributions of Python such as CPython, PyPy and Jython? – Tobias
- What are some of the most interesting applications ASTroid has been used in? – Chris
Picks
- Tobias
- Chris
- Sylvain
Keep In Touch
Links
The intro and outro music is from Requiem for a Fish The Freak Fandango Orchestra / CC BY-SA
Hello, and welcome to podcast. Init, the podcast about Python and the people who make it great. You can subscribe to our show on iTunes, Stitcher, TuneIn Radio, or add our RSS feed to your podcatcher of choice. You can also follow us on Twitter or Google plus and please give us feedback. Leave us a review on iTunes to help other people find the show, Send us a tweet, send us an email, leave us a message on Google plus, or leave a comment on our show notes. I would like to thank everyone who has donated to the show. Your contributions help us make the show sustainable. For details on how to support the show, you can visit our site at pythonpodcast.com.
I would also like to thank Hired, a job marketplace for developers, for sponsoring this episode of podcast.init. Use the link hired.com/podcastinit to double your signing bonus. Linode is also sponsoring us this week. Check them out at linode.com/podcastinit and get a $10 credit to try out their fast and reliable Linux virtual servers for your next project. We are recording today on November 23, 2015, and your host, as usual, are Tobias Macy and Chris Patti. Today, we are interviewing Sylvain Tienon about Asteroid. Sylvain, could you please introduce yourself?
[00:01:22] Unknown:
Yeah. Sure. Hello. So my name is Sylvain. I'm, I have been working with Python since, for the last, 15 years almost, mainly at Logilab, where I'm doing some various client stuff, and mostly with Python.
[00:01:44] Unknown:
So how'd you get introduced to Python?
[00:01:48] Unknown:
I get introduced to Python, as I said, almost 15 years ago. At that time, it was, Python 152. At that time, I began my internship at Logilab, and Python was the language of choice there. So I started to learn Python at this occasion. And as an intern, my first, open source project was XML diff. It was already something related to manipulating tree. It was about implementing some algorithm to to indicate the difference between 2 different XML documents.
[00:02:45] Unknown:
Can you explain what an abstract syntax tree is and why it's a useful language feature?
[00:02:51] Unknown:
I can try to do that. Well, an abstract syntax tree is a representation of a source code. Like, try 2 different kind of representation, very very abstract syntax 3 and the parse 3. Parse 3, I acquired well, the difference is that Azure Central Suite doesn't, include every element of a source code, like parent or things like that, spaces around operator or stuff like that. So that's why it's it's kinda an higher level. So in those tree, you get a representation of the structure of a source code. Each node of a tree is a a construct that occurs in the source code like an assignment. You got, child nodes, 1 for the part which is a signal 2 and and over for the value which is a etcetera.
So you get, a lot of different kind of node for every kind of construction you can have in your source code. It's, useful for different thing, like, basically, when you want to do almost anything with source code, you don't want to start from the string representation of the source code. So you start by having, a tokenizer which feeds a grammar. And from that, you usually get, this kind of representation. And from that, you can do almost what you want with it, like generating bytecodes or some source code, transformer source code, doing some static analysis like we do in binding.
[00:05:09] Unknown:
What was your inspiration for creating Asteroid?
[00:05:12] Unknown:
I didn't need really inspiration because I have not started this project from scratch. When I started with pilings from which Asteroid, come, it was in 2003, and we had a a need for this kind of tool that Georgi had, or I wanted to to check different things on, Python code. At this time, it was only PiteShaker. And, the problem with PileShaker was that it, was importing the source code. So I wanted to do something that doesn't import, this when when you import the source code, for instance, you have to you need to have all the requirements installed on your computer, and you don't necessarily want to to do that.
So, I wanted to work on the source code. And at that time, there was a compiler package in the Python store. Library, so I started from that. It wasn't, at that time, it wasn't named Asteroid, but, Logilab, a a s t n g. And so it was basically an extension to the compiler module. So that's really not a project that started from scratch. It started from this module, then, it was adapted to, as a Python evolve. For instance, in Python 2.5, it was the beginning of the exposition of internal abstract syntax abstract syntax tree of Python for the underscore AST module.
So So at this time, we had to, it's really at this time that Asteroid began to have I don't know how to do do that, I was kind of mixed AST, which was partially inspired from compiler module and from the, internal, abstracts and HST provided by Balfron, which was, of course, different. Was would be too easy. So so, it then evolved, but, in any case, for instance, a suite doesn't include its own parcel. At that time, it was either using depending on the Python version you was was using, it was using either the compiler module or the, underscore AST module, but it was providing to the end user compatible representation.
[00:08:09] Unknown:
Interesting. So what features does Asteroid offer over Python standard AST package and what makes those features important?
[00:08:20] Unknown:
So beside the kind of compatibility layer, I I may say a bit more about that later, but this is, basically drive asteroid is driven by the pylons, need. So the kind of thing you will find, is like, some more advanced way to navigate inventory, like, you see some variable and you want to know which, assignments node have affected this variable. That's kind of name lookup, but quite different. And the the really main feature is, like, is a static inference, which based based on this, name resolution is capable of, answering question like, what's the value of this variable? And it's based on it's based on simply by analyzing the the static code. That's a big difficulty where there is no actual execution of a code.
You try to find, what's the tip or even the the value of, identifier or class member, instance member, and so on based on, it's implemented using, Python generators because, of course, you may find several solution. And, so you've got an API and API where you just ask, infer me every possible values, and it will return to you, things like, crisis, instances, least, constant values, and maybe a special kind of object saying that, it has reached a path where he couldn't find, any answer. So that's really the the big thing you you've get you've got in a asteroid.
[00:10:42] Unknown:
Just so that I understand, I guess I had thought with a standard AST, that's how they worked as well, that that the AST would contain things like when you define the class, it would detain would contain the class definition with all the methods underneath that expressed as method objects with statement object. You know, I mean, like, I guess I thought it was broken down that that way. Yes. It is. So but you're saying that Asteroid allows you to infer the values.
[00:11:17] Unknown:
Yes. I do. So you're right that, in, AST, you get some when you read some Python source code, you will get, like, a a node for function def or class def and a node for every assignment there or any, method definition inside the class def. And, so it's quite low level, and you you've got and you don't have anything like, like, give me which the the value of this attribute or this value of, the value of this identifier at this point in the call. You basically only have nodes. And the and in a steward, we we have this insurance capability, which by jumping from node to node is able to get back to you with, here are the the list of value I have been able to find by, analyzing the code statically.
For instance, if you have, let's say, an identifier which is affected to a function call, then it's able to, it will look up by navigating inventory, what's this what's this function. It may be a function, let's say, that is imported from another module, and then it will get the AST for this, module. And, it will look at the function and look at, for instance, the the different values which are written by this function, and it will, get back to the caller that, you may by calling this function, you may get, I don't know, a list of, hints, for instance.
[00:13:22] Unknown:
I see. I get it now. So basically, Asteroid almost gives you IDE like functionality in the API, where you can say, what is the value here? Now, what is the value here? Now, what is the value here? As opposed to the standard AST features, where it's just node soup, almost as if you were parsing an XML document or something with all the nodes that you have to walk and traverse to get the values. Yeah. Exactly.
[00:13:51] Unknown:
That's interest And that's quite complicated stuff with, basically, you you you almost have to rewrite a kind of, Python interpreter because you you've got to, understand most of Python construct, like, I don't know, a type of segment or subscription, callable protocol. So we have to rebuild this kind of thing. So, of course, we have choose to not using the interpreter because using the interpreter would mean that the code would have to be executed. We are not executing the code. We are only partially almost executing it, but only by small bit like, I'm at this point in in the code, and then I, it will provide some API to get every information you can you will get as a programmer by following the path, reading the function, look at the values which are written, and things like that.
[00:14:57] Unknown:
Yeah. Definitely sounds as though Asteroid would be the preferred way of interacting with the AST when you're trying to infer anything about the mechanics of the program rather than having to do all of the walking of the tree yourself. I'm curious if there are any sort of higher level, you know, graph algorithms that you leverage for that capability as opposed to just doing a brute force approach.
[00:15:22] Unknown:
Yeah. Yeah. That's the kind of thing we need, in padding for static analysis. Like, you want to know this kind of thing because you want to check for instance, that's pretty similar to the things you need in a IDEA. In in a static analysis tool like Pynin, you have similar needs as in ID because you want to know if you are somewhere in your source code, you want to know that this self think of this variable, is actually some hint or some instance of, this class. And so you want to in the case of, ID, you want to know, for instance, provide a completion of in the back to a user. In the case of pining, you want to check that it actually has a method that is used or that this method will function as the correct arguments and so on.
Although, maybe you don't mix, string with hint and raise and, infinity, I think you may want to do with this kind of, capabilities.
[00:16:44] Unknown:
So it sounds like with asteroid and pilot, you have at least some capability of doing type inference to determine if you're trying to do an incompatible assignment or access of various typing. And also, I'm curious if the recent addition of the typing module to Python 3.5 is going to be a boon to for your purposes in that respect.
[00:17:07] Unknown:
Yeah. Yeah. We we are not currently we we are not yet, capable of, getting advantages during, using type annotation we get in Python free. But, at some point, we definitely will.
[00:17:27] Unknown:
And so I know that the asteroid package is used in Pylund, which is also maintained by LogiLab. How does the AST facilitate static analysis of Python projects in other cases when you have to fall back to doing text parsing?
[00:17:41] Unknown:
So, first, to be clear, LogiLab has created PLL PILENT and Asteroid back in 2003. We have maintained it for the almost from until, until now. But there there are now several people in the boat with us, which are actually doing the most of the work. Like, there has been some people from Google which, have been involved in, pilot since for for maybe 5 years now. It it was the first important contributors we get. For 2 years now, we have another people which is actively maintaining pylons and asteroid. And we have even have now some new guy, which, is working particularly on asteroid because he want to use it in another project, which is named macro py, which, I don't know well, but attempts to provide macro for Python. So so we are not the only maintenance now.
A lot of some very active people, and I think that that's very good both for piling piling and asteroids since it's almost never both projects have never been so active that they are they are no. So to to get back to the question, the it provides some nice facilities like, high level representation of a source code. So we already talked a bit about that. In the case of Python, it's also a way to get a compatible representation with a Python version. We used to provide support for something like Python from a 2.1 or 2.22.6. No. Pynin itself is running, and even, Astro is only running using Python 2.set because, it's a way to have a code which is, compatible using both Python 2 and Python 3. But, you can still pass some code which is written for all the Python version.
So, Asteroid provide this, compatibility level. And, 1 of the main point is that it's generic to AST is that once you get this representation, you can process it for for well known design patterns design pattern of, I mean, name name name, leave a visitor pattern. So it's something which I don't know if I have to explain this. But,
[00:20:55] Unknown:
we can just add a link to it in the notes.
[00:20:59] Unknown:
Like, so this is a quite easy design pattern which allows you to do, really different thing. Like, is using it, for annotating the source code and maybe, emitting messages. Or you will see similar thing in compiler if you want to generate some more advanced representation for your source code if you want to to generate binary stuff or things like that. So this is what you can do with an AST, but there are, some things like, where where you don't have you have lost information in the AST, like, so we indeed have to go back to text parsing. For instance, if you want to in the case of, static analysis, if you want to, take a look at what's in the command or in commands you you don't have, you you have lost commands in the AST.
Or if you want to, for instance, check that you have a, like a peb a checker, almost you you can do anything with an AST because we want to will be interested in, like, line length or spaces around around operators, things like that. So, you you have some time to fall back, in such case to text parsing. We do that in parent. Actually, in parent, we have even free kind of checkers while working on the AST using a visitor pattern. You may also, provide some checker which we work, at the token level using the tokenized module of a Python standard library or directly on the file using line 3.
For instance, in case of, for the the tokenized module, we recently wanted to add a check that, you know, if you are waiting, if else if another condition, in some case, you may want to rewrite it. You you may be able to rewrite it using a single if elif elif con construction. You see what I mean? Mhmm. So, in the case of abstract syntax tree, in the Python abstract syntax tree, it already if you have in your source code if, elif something, you will have in the abstract syntax c, if else with a child if else node in the in the else branch of the first if.
You see? So it's not if you if you just write it back, to Python, you won't get the exact same thing as the 1 which you have been parsing. So, in this case, that that's an example where we had to, take a look at the output of a tokenizer to see, to distinguish between, if node which are actually if node or if node which have been introduced by the parser but which are actually, elif part of a previous if. And, so that's an example where we have to get back to tokenize. And, I think I already mentioned cases where we have to go back to text parsing for, like, common spaces, and almost everything which is in the PEP 8.
[00:24:59] Unknown:
Yeah. I can definitely see where text parsing wouldn't or where the AST wouldn't provide the full suite of information that you would need to do proper analysis of Python code for code quality and sort of stylistic checks as well. So
[00:25:16] Unknown:
Yeah. You you even don't have, for instance, a parent, which is used to which are used to balance, expression. Mhmm. So this is you may you don't know if, there are or they are not parent in the original source code. So without, extra information, you can't from the AST, you you you are not able to reproduce the the original source code. That's where you will have to jump to over representation like parse 3.
[00:25:57] Unknown:
Well, I have to say that having a greater understanding of the mechanisms that are going on under the covers when using Pylint, I'm very grateful for all of the hard work that you and everyone else has put into it to make my life easier for determining where I'm doing things wrong in my code.
[00:26:15] Unknown:
Thanks.
[00:26:15] Unknown:
And so beyond static analysis, what are some of the other possible uses for the Python AST and the asteroid library?
[00:26:23] Unknown:
Yes. As I said, there is a guy now early working on Asteroid, which in terms to make it a reference implementation of AST for Python because, it as I said, it's, it was extracted from Paint, a long time ago, with intent that it may be used by other project, but as it was, mainly drive, driven by pilot needs, of the API wasn't, as clear as it should be. But I think it provides enough, nice features to be attractive. So this guy decided to make it clean and, make it at some point to to to make it more powerful, and to use it for this, micro cry project. You can also, I don't know, maybe generate documentation or the AST is also used for the for instance, doing things like 2 23, like reading Python 2 code and generating Python 3 code.
But, in this case, it's, it's use, it's using, it's not using the same base implementation, as we are using, because we already say that you lose some information that you don't want to lose if you are transforming your source code from Python 2 to to Python 3. You maybe won't be very happy if you lose all your comments and and, formatting on the way. You can also maybe do some kind of, code completion. We already talked about, using it in ID, things like that. I have met some long time ago, I have made a toy that was allowing you to, display your source code in HTML.
And then you could click on every variable and it was jumping into a place where it was defining your source code. It was the kind of thing you may want to do.
[00:28:55] Unknown:
That sounds like a very interesting project.
[00:28:58] Unknown:
It's a dead project. It was only it was something I've done in in the EuroPython, 5 lightning talk. But, I have not, I don't even know where source code is.
[00:29:16] Unknown:
Well, it's just another example of where whimsy and programming can be can lead to some pretty outcomes.
[00:29:23] Unknown:
Yeah.
[00:29:24] Unknown:
Yeah. I know that there are a few other projects I've come across recently that leverage the AST for some pretty interesting effect, such as, a little while ago, we interviewed the folks behind the high laying implementation of running a Lisp dialect on top of the Python VM. They said they use the AST, and there's also the Pony ORM, which uses the AST to allow you to write SQL expressions using Python, list comprehensions and generator expressions. So, the documentation for the AST package in Python mentions that the specific syntax objects in the tree are subject to change between releases. And I'm wondering if the asteroid package provides any abstractions to maintain a consistent API between different Python versions, or does it just provide a pass through for those syntax objects and adds the extra metadata around and convenience methods around the tree itself?
[00:30:19] Unknown:
Yes. It does this of thing. Actually, it always start from the Python representation. So it use it uses a Python parser. But, from this, from the, AST, which is written by the Python parser, You've got, afterwards a rebuild stuff, step, sorry, that will, kind of, normalize this Python tree. So it's it's compatible with, when there is some change across Python version. So you should may expect to have always the same the same representation. That's actually a basic need for tools like Piling where you don't want to you want a single Piling. You don't want to to under every case, every case of, Python version.
Also, it provides, for instance, when a new a new release Python release introduced some new nodes because there are some new construct, in the grammar. Usually, you may import them from asteroid, even if you are using a lower version. So that's a kind of consistent API and, that doesn't mean we don't want to make it make it moving. It evolves as all API that, we we are trying to do it in a proper way with some kind of deprecation for some time. Like if you are using the old API, it will still work. But with a deprecation warning, which usually explain which new method of function or class you should use.
So because of course, we, we don't have the same constraint as Python and, we that's a kind of service which is provided by, asteroid.
[00:32:30] Unknown:
Have you encountered any challenges in testing Asteroid given that it operates at such a low level in the language?
[00:32:37] Unknown:
Well, not really in in testing. However, there are some tricky stuff in Astra because, a feature I forgot to mention was is that Asteroid provides, provides AST representation for live for objects which don't objects which don't have, source code, like, built ins or objects which are implemented in c extension or even Python code where source code isn't distributed. So it's very useful. Like, you you may want to in some case, for instance, in in pilot, we don't want to have special special way to understand either, Python source code or code which is coming from built ins.
We want to be able to handle them similarly, and also it's very useful. It's almost a need if you want to do some kind of static inference. You don't want 2 different representation. You have to share the various the same kind of representation whether, you see that, I don't know, you you have a list defined in your Python source code or whether you have some kind of, built in function which return a list or things like that. So that's that's somewhat a bit tricky. For instance, you have to bootstrap the asteroid, packages for for for asteroid representation using by by, building some representation for everything that is in the built in model in Python.
You need to do that in a specific time because it does some advanced stuff. And for instance, when it's building an AST, it will itself use the in its own inference capabilities to add some information to this AST. So, it's a bit tricky to bootstrap the process. I think that's the kind of thing which also make, makes, asteroid difference from other projects.
[00:35:18] Unknown:
So speaking of asteroid being different from other projects, do you have trouble getting contributors given the great understanding of Python's inner workings required?
[00:35:28] Unknown:
Maybe. We we have been working on Pylint and Asteroid without much, contributors for years. But, I think there's a a fairly good ecosystem in Python. I don't know if you are aware of the cut quality mailing list, which is about cut quality in general in Python, of course, and where you will find people which are involved in F8, Flake 8, Tiling, and another tools like that. So you have some people, with, which are, I think, advanced Python user and quite good, computer scientist. So we there there are a lot of people but that's pretty good people and, we currently have maybe 3 people working in on Australia or Binance.
But if you take a look at the Bitbucket projects since, both are hosted, at Bitbucket for now, you will see that it's very, very active. So I can't say that's, it's a struggle.
[00:36:57] Unknown:
And so does the implementation or representation of the AST differ between different distributions of Python, such as CPython, Pypy, and Jython?
[00:37:06] Unknown:
No. This is, the AST is is representing the Python language, and it should be so very different version of the language, but that's like, Python 2 or Python 3, or maybe you've got different constraint in Python 2 dot 5 and Python 3 dot 2. Provided that you are comparing CPython, 2 dot 7 and Py2.7, it should be the same AST, and Asteroid should be able to work with any Python implementation.
[00:37:51] Unknown:
I guess that's another benefit of having such a well specified language definition as opposed to some of the other languages that have alternate implementations such as Ruby?
[00:38:02] Unknown:
Yes, indeed.
[00:38:04] Unknown:
So what are some of the most interesting applications Asteroid has been used in?
[00:38:08] Unknown:
As I said, Asteroid has been designed to be used in other projects, but, until now, it was kinda failed probably because of various region, like, I mentioned, like, maybe there was a bit of technical depth. The API has grown and need to be refreshed. And also, there are a few projects that really need this kind of things. So Tyrant is definitely the the easy user in the place. I think that it will probably change in the near future because there is easy lifting, you know, which is, in done currently by, contributors. So I hope the best is, still to come.
[00:39:08] Unknown:
So before we move to the picks, are there any questions that we didn't ask that you think we should have, or anything that you would like to add?
[00:39:15] Unknown:
No. That's fine by me. Okay.
[00:39:17] Unknown:
Alright. So I guess with that, we will move to the the picks. And for my first pick today, I'm gonna choose the pre commit framework by the folks at Yelp. I just added this to my project at work. And it's a library or framework that lets you easily add and specify pre commit hooks to run on your project. And it supports multiple languages. So built in they have the ability to do hooks that are written with Python, Ruby, Node, as well as general scripts or system binaries. So I actually just added a pull request to it recently for being able to specify additional dependencies so that you don't have to go and rewrite a module for it just to add some extra plugins.
Most specifically, in my case, was for ESLint. So definitely pretty useful. I recommend checking it out so that you can add some pre commit checks for doing static analysis and executing your tests before you actually push it up to your repos. For my next pick, I'm going to pick an online comic called Existential Comics. And these are all pretty funny treatments of different schools of philosophy. And so the 1 most recently is a comic of various philosophers taking part in the storyline of Monty Python's Holy Grail. So I can't even begin to do it justice by explanation, so I recommend you just go check it out. And my last pick is a project I came across recently called HTMLPy, which seems to be taking a page out of the playbook of the different, node based desktop apps that have been coming out recently that are leveraging web technologies for making it easy for different people to create desktop GUI apps. And so this is an application that lets you use HTML5 and CSS3 for defining some of the UI of your program. And then it uses PyQt under the covers to provide the frame as well as being able to provide back end logic in Python. So pretty interesting. And I'm definitely happy to see that as a new entrant into the Python GUI ecosystem as a way to help move forward desktop applications beyond what we currently have available and to maybe bring in some people from the web community to provide beautiful looking UIs to Python programs.
And with that, I will pass it to you, Chris.
[00:41:49] Unknown:
Very cool. I'm gonna keep my picks relatively short this week because I'm I have a hard stop. But, I have 2. The first is a beer. It is the Pretty Things Brewery Fluffy White Rabbits. It is a really great triple with a fluffy mouthfeel as they say, which I know sounds kind of strange but it's true. And a really nice fruity character. And Pretty Things is ceasing production, so Boston area beer fans are sad. And my next pick is a game. If you're a gamer, you've already heard about this, but oh my God. Fallout 4 is is really impressive. As a Since it's set in the Boston area, as a long time Bostonian, I am kind of blown away. Even by things like the detail of the trees and the grass, it looks like trees and grass look like here, which I realize is a small thing. But it's kinda makes the whole experience even more surreal like you're actually wandering around in an area that you know well.
Great stuff. Sylvain, what do you have for us for pics?
[00:42:55] Unknown:
I have, 2 picks which are many things I have also worked on. My first 1 would be Pyreversed. It may be good to know that this tool is distributed with Pyrevent, and it's a nice thing to do some quick reverse engineering. Like, you just start Py Pyrevers on your project, and it will be able to produce class class diagram or package, diagram from for the whole project, or you can say, give me a diagram for this class with maybe all the cases which are related to gems around and things like that. So it's pretty nice, and I think it's a a good way to stop maybe doing too much, UML diagram when, in a specification phase. Just write your Python code and get the diagram afterwards.
So that's, was my first pick. The other is, another project, on which I have been very involved, and which is mainly developed at LogiLab is a Cubic Web Web Framework. So that's, a web framework for Python, which is quite, at, higher level than Django or Pyramidal Flask or usual, Python web framework. And it's heavily relying on the principle of semantic web, like every object there has a URL. It attempts to write some to to expose your data, using nonvocabularies such as for anything. So you you just start up with a a schema. You've got a working application, and then you can, put some data there and apply some view to your to your data.
So it's a different, way to to build your web application, which is very incremental. So so you can build, application very with a lot of agility, and I think it may, it is overlooked.
[00:45:42] Unknown:
Okay. So I really appreciate you taking the time out of your evening to join us today to talk about asteroid and some pilot. And for anybody who wants to keep in touch with you and follow what you're up to, what would be the best way for them to do that?
[00:45:57] Unknown:
Well, you can for people which are interest in or in Piling, I highly recommend to, register to the code quality mailing list. There is also the Piling dev mailing list for people who which are more interested in contributing or with a more technical question. I'm on Twitter at, cyteno, s y t h e n a u l t. My name is a bit complicated. And, of course, you can follow, our work at logilab on our logilab.org website or cubicweb.org, website or Twitter atrogelab.
[00:46:51] Unknown:
Excellent. Well, thank you again, and I hope you enjoy the rest of your evening.
[00:46:56] Unknown:
Thank you for receiving me. Thanks. Bye bye. Bye bye. Ciao.
Introduction and Episode Sponsors
Interview with Sylvain Tienon
Sylvain's Background and Introduction to Python
First Open Source Project: XML Diff
Understanding Abstract Syntax Trees (AST)
Inspiration and Evolution of Asteroid
Features and Importance of Asteroid
Static Inference and IDE-like Functionality
Challenges and Text Parsing in Static Analysis
Contributors and Community Involvement
AST Representation Across Python Distributions
Interesting Applications of Asteroid
Picks and Recommendations
Closing Remarks and Contact Information