2011 by AG DSN.
This is the “backend” package, and as such mainly contains
things related to the pycroft
business logic (i.e., pycroft.lib
)
a definition of the database model (i.e., pycroft.model
).
In particular, this means that at no point should there be any dependencies to flask
or
other frontend-specific libraries.
UTCTZInfoFactory
UTCTZInfoCursorFactory
create_engine()
create_db_model()
drop_db_model()
Address
ModelBase
MappedAsDataclass
IntegerIdModel
Config
Config.member_group_id
Config.member_group
Config.network_access_group_id
Config.network_access_group
Config.violation_group_id
Config.violation_group
Config.external_group_id
Config.external_group
Config.blocked_group_id
Config.blocked_group
Config.caretaker_group_id
Config.caretaker_group
Config.treasurer_group_id
Config.treasurer_group
Config.pre_member_group_id
Config.pre_member_group
Config.traffic_limit_exceeded_group_id
Config.traffic_limit_exceeded_group
Config.payment_in_default_group_id
Config.payment_in_default_group
Config.membership_fee_account_id
Config.membership_fee_account
Config.membership_fee_bank_account_id
Config.membership_fee_bank_account
Config.fints_product_id
Config.id
compile_if_clause()
DropConstraint
visit_drop_constraint()
LazilyComiledDefDescriptor
Function
CreateFunction
DropFunction
visit_create_function()
visit_drop_function()
Rule
CreateRule
DropRule
visit_create_rule()
visit_drop_rule()
Trigger
ConstraintTrigger
CreateTrigger
CreateConstraintTrigger
DropTrigger
create_add_constraint_trigger()
create_add_trigger()
visit_drop_trigger()
View
CreateView
DropView
visit_create_view()
visit_drop_view()
DDLManager
PycroftModelException
Site
Building
Room
Room.number
Room.level
Room.inhabitable
Room.building_id
Room.building
Room.address_id
Room.address
Room.swdd_vo_suchname
Room.connected_patch_ports
Room.users_sharing_address
Room.users
Room.hosts
Room.room_history_entries
Room.log_entries
Room.patch_ports
Room.tenancies
Room.short_name
Room.level_and_number
Room.is_switch_room
Room.latest_log_entry
Room.id
MembershipFee
Semester
Account
AccountPattern
Transaction
Split
IllegalTransactionError
check_transaction_on_save()
check_split_on_update()
BankAccount
BankAccount.name
BankAccount.bank
BankAccount.owner
BankAccount.account_number
BankAccount.routing_number
BankAccount.iban
BankAccount.bic
BankAccount.fints_endpoint
BankAccount.account_id
BankAccount.account
BankAccount.activities
BankAccount.mt940_errors
BankAccount.balance
BankAccount.last_imported_at
BankAccount.id
BankAccountActivity
BankAccountActivity.bank_account_id
BankAccountActivity.bank_account
BankAccountActivity.amount
BankAccountActivity.reference
BankAccountActivity.other_account_number
BankAccountActivity.other_routing_number
BankAccountActivity.other_name
BankAccountActivity.imported_at
BankAccountActivity.posted_on
BankAccountActivity.valid_on
BankAccountActivity.transaction_id
BankAccountActivity.transaction
BankAccountActivity.account_id
BankAccountActivity.account
BankAccountActivity.split
BankAccountActivity.matching_patterns
BankAccountActivity.id
MT940Error
greatest
least
sign
compile_default_function()
compile_sqlite_greatest()
compile_sqlite_least()
compile_sqlite_sign()
Host
Switch
MulticastFlagException
TypeMismatch
Interface
SwitchPort
IP
LogEntry
TaskLogEntry
UserLogEntry
RoomLogEntry
VLAN
Subnet
PatchPort
evaluate_properties()
CurrentProperty
NullScopedSession
set_scoped_session()
with_transaction()
utcnow()
current_timestamp()
TenancyStatus
RentalObject
RentalObject.vo_id
RentalObject.suchname
RentalObject.name
RentalObject.voart_id
RentalObject.nutzungsart_id
RentalObject.nutzbarvon
RentalObject.nutzbarbis
RentalObject.status
RentalObject.wohneim_id
RentalObject.wohneim_suchname
RentalObject.wohneim_name
RentalObject.stockwerk_id
RentalObject.stockwerk
RentalObject.stockwerk_name
RentalObject.haus_id
RentalObject.haus_name
Tenancy
TaskType
TaskStatus
Task
UserTask
TaskParams
handle_validation_error()
UserMoveOutSchema
UserMoveOutParams
UserMoveSchema
UserMoveParams
UserMoveInSchema
UserMoveInParams
TrafficVolume
traffic_history_query()
traffic_history()
TrafficHistoryEntry
IPAddress
IPNetwork
MACAddress
Money
TsTzRange
InvalidMACAddressException
DateTimeTz
UnixAccount
UnixTombstone
check_unix_tombstone_lifecycle_func
unix_account_ensure_tombstone_func
ensure_tombstone
check_tombstone_consistency
IllegalLoginError
IllegalEmailError
BaseUser
BaseUser.login
BaseUser.login_hash
BaseUser.name
BaseUser.registered_at
BaseUser.passwd_hash
BaseUser.email
BaseUser.email_confirmed
BaseUser.email_confirmation_key
BaseUser.birthdate
BaseUser.swdd_person_id
BaseUser.room_id
BaseUser.login_regex
BaseUser.login_regex_ci
BaseUser.email_regex
BaseUser.blocked_logins
BaseUser.login_character_limit
BaseUser.validate_login()
BaseUser.validate_email()
BaseUser.validate_passwd_hash()
BaseUser.check_password()
BaseUser.password
User
User.wifi_passwd_hash
User.account_id
User.account
User.tombstone
User.unix_account_id
User.unix_account
User.address_id
User.address
User.room
User.email_forwarded
User.password_reset_token
User.memberships
User.room_history_entries
User.hosts
User.mpsk_clients
User.authored_log_entries
User.log_entries
User.task_log_entries
User.tenancies
User.tasks
User.traffic_volumes
User.has_custom_address
User.validate_login()
User.property_groups
User.traffic_for_days()
User.current_properties
User.current_properties_maybe_denied
User.current_properties_set
User.latest_log_entry
User.wifi_password
User.has_wifi_access
User.verify_and_get()
User.current_memberships
User.active_memberships()
User.active_property_groups()
User.member_of()
User.has_property()
User.permission_level
User.email_internal
User.birthdate
User.email
User.email_confirmation_key
User.email_confirmed
User.id
User.login
User.login_hash
User.name
User.passwd_hash
User.registered_at
User.room_id
User.swdd_person_id
create_pgcrypto()
Group
Membership
create_btree_gist()
PropertyGroup
Property
RoomHistoryEntry
PreMember
PreMember.login
PreMember.email
PreMember.email_confirmation_key
PreMember.email_confirmed
PreMember.id
PreMember.login_hash
PreMember.move_in_date
PreMember.name
PreMember.registered_at
PreMember.room_id
PreMember.swdd_person_id
PreMember.previous_dorm
PreMember.birthdate
PreMember.passwd_hash
PreMember.room
PreMember.tenancies
PreMember.is_adult
WebStorage
get_or_create_address()
PycroftLibException
RoomAlreadyExistsException
get_overcrowded_rooms()
similar_rooms_query()
create_room()
edit_room()
get_room()
RoomAddressSuggestion
suggest_room_address_data()
sort_buildings()
determine_building()
user_has_paid()
get_typed_splits()
get_transaction_type()
get_last_import_date()
import_newer_than_days()
get_system_accounts()
get_accounts_by_type()
get_all_bank_accounts()
get_unassigned_bank_account_activities()
get_all_mt940_errors()
change_mac()
generate_hostname()
host_create()
host_edit()
migrate_host()
host_delete()
interface_create()
interface_edit()
interface_delete()
sort_ports()
get_conflicting_interface()
setup_ipv4_networking()
PatchPortAlreadyPatchedException
PatchPortAlreadyExistsException
create_patch_port()
edit_patch_port()
delete_patch_port()
patch_switch_port_to_patch_port()
remove_patch_to_patch_port()
create_switch_port()
edit_switch_port()
delete_switch_port()
edit_switch()
create_switch()
delete_switch()
log_event()
log_task_event()
log_user_event()
log_room_event()
Mail
MailTemplate
compose_mail()
RetryableException
send_mails()
UserConfirmEmailTemplate
UserResetPasswordTemplate
UserMovedInTemplate
UserCreatedTemplate
MemberRequestPendingTemplate
MemberRequestDeniedTemplate
MemberRequestMergedTemplate
TaskFailedTemplate
MemberNegativeBalance
send_template_mails()
MailConfig
known_properties()
grant_property()
deny_property()
remove_property()
make_member_of()
remove_member_of()
edit_property_group()
delete_property_group()
user_memberships_query()
change_membership_active_during()
SubnetFullException
MacExistsException
get_free_ip()
get_subnets_for_room()
calculate_max_ips()
SubnetUsage
get_subnets_with_usage()
delete_ip()
user_search_query()
OverviewStats
overview_stats()
get_swdd_person_id()
get_relevant_tenancies()
get_first_tenancy_with_room()
TaskImpl
UserTaskImpl
UserMoveOutTaskImpl
UserMoveTaskImpl
UserMoveInTaskImpl
get_task_implementation()
schedule_user_task()
get_active_tasks_by_type()
get_scheduled_tasks()
cancel_task()
manually_execute_task()
reschedule_task()
UserTrafficInfo
get_users_with_highest_traffic()
delete_old_traffic_data()
ArchivableMemberInfo
get_archivable_members()
get_invalidated_archive_memberships()
diff_month()
last_day_of_month()
digits()
ErrorCode
DigitSumModNCode
Mod97Code
get_locale()
set_translation_lookup()
Message
localized()
gettext()
dngettext()
ngettext()
dgettext()
deferred_gettext()
deferred_dngettext()
deferred_ngettext()
deferred_dgettext()
get_locale()
get_translations()
set_locale_lookup()
set_translation_lookup()
gettext()
dgettext()
ngettext()
dngettext()
deferred_gettext()
deferred_dgettext()
deferred_ngettext()
deferred_dngettext()
Formattable
Formatter
format_number()
format_decimal()
format_currency()
format_date()
format_datetime()
format_time()
format_timedelta()
format_bool()
format_none()
format_interval()
identity()
format_param()
Message
ErroneousMessage
SimpleMessage
NumericalMessage
identity()
deserialize_money()
serialize_interval()
deserialize_interval()
serialize_param()
deserialize_param()
Money
qualified_typename()
PositiveInfinity
PositiveInfinityType
NegativeInfinity
NegativeInfinityType
Bound
Interval
Interval.from_explicit_data()
Interval.lower_bound
Interval.upper_bound
Interval.begin
Interval.end
Interval.unbounded
Interval.empty
Interval.length
Interval.strictly_before()
Interval.before()
Interval.strictly_after()
Interval.after()
Interval.meets()
Interval.strictly_overlaps()
Interval.overlaps()
Interval.strictly_during()
Interval.during()
Interval.strictly_contains()
Interval.contains()
Interval.starts()
Interval.finishes()
Interval.intersect()
Interval.join()
Interval.closure
Interval.map()
closed()
closedopen()
starting_from()
openclosed()
open()
single()
empty()
UnboundedInterval
IntervalSet
mac_regex
ip_regex
port_name_sort_key()
reverse_pointer()
get_interface_manufacturer()
generate_password()
hash_password()
cleartext_password()
verify_password()
login_hash()
generate_random_str()
TimeTz
DateTimeTz
DateTimeNoTz
time_min()
time_max()
datetime_min()
datetime_max()
ensure_tz()
with_min_time()
with_max_time()
safe_combine()
ensure_tzinfo()
combine_ensure_tzinfo()
combine_or_midnight()
This module defines celery tasks to run tasks
(as persisted in the database by means of pycroft.model.task)
by using implementations as defined in pycroft.lib.task
(see TaskImpl
).
Base class for tasks which use the database.
Handler called after the task returns.
status (str): Current task state. retval (Any): Task return value/exception. task_id (str): Unique id of the task. args (Tuple): Original arguments for the task. kwargs (Dict): Original keyword arguments for the task. einfo (~billiard.einfo.ExceptionInfo): Exception information.
None: The return value of this handler is ignored.