Getting started¶
Make sure you have both pip and at
least version 3.5 of Python before starting. ASAB uses the new async
/await
syntax, so earlier versions of python won’t work.
- Install ASAB:
python3 -m pip install asab
- Create a file called
main.py
with the following code:
#!/usr/bin/env python3
import asab
class MyApplication(asab.Application):
async def main(self):
print("Hello world")
self.stop()
if __name__ == '__main__':
app = MyApplication()
app.run()
- Run the server:
python3 main.py
You now have a working ASAB application server, ready for your mission!