Re: [sqlalchemy] Docstring recommendations for SQLalchemy models?

2021-01-24 Thread Samuel Marks
Good clarification. Didn't know about those PEPs. So you're thinking that for runtime discoverability to use `doc` first, and fallback to `comment`? My idea with this project is to translate between: ↔ SQL ↔ Python (public served API, models, tests) ↔ Rust (public served API, models, tests) ↔

Re: [sqlalchemy] Docstring recommendations for SQLalchemy models?

2021-01-24 Thread Mike Bayer
On Sun, Jan 24, 2021, at 7:53 PM, Samuel Marks wrote: > Again, my goal isn't related to Sphinx (although generating nice > documentation is of course, a nice-to-have). > > One advantage of having the generated SQL code be commented is that I could > write parsers that go from SQL files to SQL

Re: [sqlalchemy] Docstring recommendations for SQLalchemy models?

2021-01-24 Thread Samuel Marks
Again, my goal isn't related to Sphinx (although generating nice documentation is of course, a nice-to-have). One advantage of having the generated SQL code be commented is that I could write parsers that go from SQL files to SQL alchemy models, complete with docs. The issue with having loose

Re: [sqlalchemy] Docstring recommendations for SQLalchemy models?

2021-01-24 Thread Mike Bayer
On Sun, Jan 24, 2021, at 5:20 PM, Samuel Marks wrote: > Dear Mike, > > My tool works at the AST level, and converts between: > * different docstring formats; > * having types in docstring or explicitly annotated; > * argparse parser augmenting function, class [plain old python class], >

Re: [sqlalchemy] Docstring recommendations for SQLalchemy models?

2021-01-24 Thread Samuel Marks
Dear Mike, My tool works at the AST level, and converts between: - different docstring formats; - having types in docstring or explicitly annotated; - argparse parser augmenting function, class [plain old python class], methods/functions The next step is to add support for

Re: [sqlalchemy] Set PostgreSQL default index tablespace

2021-01-24 Thread Mike Bayer
On Sun, Jan 24, 2021, at 9:42 AM, sector119 wrote: > Hello > > Is it possible to set default tablespace for all indexes? > > I know that I cat set it with > Index('my_index', my_table.c.data, postgresql_tablespace='my_tablespace') > > But I want to set set it by default somehow, that when I

Re: [sqlalchemy] Docstring recommendations for SQLalchemy models?

2021-01-24 Thread Mike Bayer
hey there, sorry I hadn't responded to this. is your tool reformatting Python code? I don't see anything "wrong" with it other than the code looks kind of verbose.This would be a matter of personal preference but if it were me I'd want each attribute to have a string description listed

[sqlalchemy] Set PostgreSQL default index tablespace

2021-01-24 Thread sector119
Hello Is it possible to set default tablespace for all indexes? I know that I cat set it with Index('my_index', my_table.c.data, postgresql_tablespace='my_tablespace') But I want to set set it by default somehow, that when I just put "index=True" on column, I get index created at some