MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / add_ip

Method add_ip

apps/base/dependencies.py:83–88  ·  view source on GitHub ↗
(self, ip: str)

Source from the content-addressed store, hash-verified

81 return True
82
83 def add_ip(self, ip: str) -> int:
84 ip_info = self.ips.get(ip, {"count": 0, "time": datetime.now()})
85 ip_info["count"] += 1
86 ip_info["time"] = datetime.now()
87 self.ips[ip] = ip_info
88 return ip_info["count"]
89
90 async def remove_expired_ip(self) -> None:
91 now = datetime.now()

Callers 11

share_textFunction · 0.80
share_fileFunction · 0.80
get_file_metadataFunction · 0.80
post_file_metadataFunction · 0.80
get_code_fileFunction · 0.80
select_fileFunction · 0.80
download_fileFunction · 0.80
complete_uploadFunction · 0.80
presign_upload_initFunction · 0.80
presign_upload_proxyFunction · 0.80
presign_upload_confirmFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected