Path.stat

Path.stat(...)

Description

Documentation for Path.stat.

Python Python Pathlib Official Docs

Real-World Examples

Practical code examples showing how Path.stat is used in real projects.

description
                            pushedAt
                            primaryLanguage {
                                name
                            }
                            openIssues: issues(states: OPEN) {
                                totalCount
                            }
                        }
                    }
                }
            }
        }
        """
        self.bulk_size = 50
        self.bulk_count = 2
        self.gql_stars = self.gql_format % ("stars:>1000 sort:stars", self.bulk_size, "%s")
        self.gql_forks = self.gql_format % ("forks:>1000 sort:forks", self.bulk_size, "%s")
        self.gql_stars_lang = self.gql_format % ("language:%s stars:>0 sort:stars", self.bulk_size, "%s")

        self.col = ['rank', 'item', 'repo_name', 'stars', 'forks', 'language', 'repo_url', 'username', 'issues',
                    'last_commit', 'description']

    @staticmethod
    def parse_gql_result(result):
async with session.request(method, url, **request_kwargs) as response:
                response_text = await response.text()

                # 检查HTTP状态码
                if response.status >= 400:
                    print(f"API请求失败: HTTP {response.status}")
                    print(f"响应内容: {response_text}")
                    return None

                # 解析JSON响应
                try:
                    return json.loads(response_text)
                except json.JSONDecodeError:
                    print(f"JSON解析错误: {response_text}")
                    return None

    # ===== 用户相关方法 =====

    async def get_user(self, username: Optional[str] = None) -> Dict:
        """获取用户信息

        Args:
            username: 指定用户名,不指定则获取当前授权用户