Firstly, Pyramid can absolute totally handle this case simply because Pyramid is storage-agnostic, so it does not know anything about databases, SQL and other such stuff :) In other words, the question is not related to Pyramid in any way.
Secondly, SQLAlchemy does support composite primary keys. From the top of my head, the declarative classes would look like this:
class Person(sa.Base):
person_id = sa.Column(sa.Integer, primary_key=True)
start = sa.Column(sa.DateTime, primary_key=True)
end = sa.Column(sa.DateTime, primary_key=True)
name = sa.Column(sa.String)
class Assignment(sa.Base):
person_id = sa.Column(sa.Integer, primary_key=True)
start = sa.Column(sa.DateTime, primary_key=True)
end = sa.Column(sa.DateTime, primary_key=True)
...
and your query would look like this:
(session.query(Person.name, Assignment.jobId, Assignment.LocID)
.filter(Assignment.person_id==Person.person_id)
.filter(sa.sql.functions.now().between(Person.start, Person.end))
.filter(sa.sql.functions.now().between(Assignment.start, Assignment.end))
)