Last active
September 2, 2019 07:27
-
-
Save goraj/dd72a428364ae63cfa35b46fef51bb8f to your computer and use it in GitHub Desktop.
Using NextMoveSoftware Arthor in SQLAlchemy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_matching_buildingblocks( | |
db: Session, | |
smarts: str, | |
limit: int, | |
) -> List[BuildingBlock]: | |
r = db.query(BBSelect) \ | |
.filter(func.arthor.matches(column('atdb'), smarts)) \ | |
.limit(limit) \ | |
.all() | |
return [ | |
BBSelection.BBSelect.from_orm(elem) | |
for elem in r | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment