Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9341241
stat.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
798 B
Subscribers
None
stat.py
View Options
# Copyright (C) 2015-2017 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
from
swh.web.api
import
service
from
swh.web.api
import
apidoc
as
api_doc
from
swh.web.api.apiurls
import
api_route
@api_route
(
r'/stat/counters/'
,
'stat-counters'
)
@api_doc.route
(
'/stat/counters/'
,
noargs
=
True
)
@api_doc.returns
(
rettype
=
api_doc
.
rettypes
.
dict
,
retdoc
=
"""dictionary mapping object types to the amount of
corresponding objects currently available in the archive"""
)
def
api_stats
(
request
):
"""Get statistics about the content of the archive.
"""
return
service
.
stat_counters
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Fri, Jul 4, 11:53 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3349035
Attached To
rDWAPPS Web applications
Event Timeline
Log In to Comment